Siticone File Picker
The SiticoneFilePicker (internally SiticoneFilePickerDisplay) is a specialized input control designed for selecting file paths or folders.
It combines a text display area with a customizable action button and status icon, wrapped in a modern, animated container.
Appearance & Style
Customize the visual presentation including borders, backgrounds, and text styles.
| Property | Type | Description |
|---|---|---|
PickerStyle |
Enum |
Default: Standard bordered box.Material: Underline style common in modern apps.
|
BackgroundColor |
Color | The background fill color of the control. |
BorderColor |
Color | The color of the border in its idle state. |
FocusBorderColor |
Color | The border color when the control has focus. |
HoverBorderColor |
Color | The border color when the mouse hovers over the control. |
CornerRadius... |
int | Individual radius settings for each corner (TopLeft, TopRight, etc.). |
MakeRadial |
bool | Automatically sets corners to create a pill shape based on height. |
Text & Placeholder
Manage the displayed text and placeholder hint.
| Property | Type | Description |
|---|---|---|
TextContent |
string | The selected file path displayed in the control. |
PlaceholderText |
string | Text shown when TextContent is empty (e.g., "Select a file..."). |
PlaceholderColor |
Color | Color of the placeholder text. |
IsReadOnly |
bool | If true, the user cannot type in the box (must use the button). |
Action Button
Configure the integrated button on the right side, typically used to open a file dialog.
| Property | Type | Description |
|---|---|---|
ButtonImageIdle |
Image | The icon displayed on the button. |
ButtonColor |
Color | Background color of the button. |
ButtonHoverColor |
Color | Background color when hovering over the button. |
ButtonSize |
int | Width/Height of the button area. |
RippleEnabled |
bool | Enables a ripple animation effect when the button is clicked. |
Events
Respond to user interactions.
// Fired when the right-side button is clicked.
filePicker.ButtonClick += (s, e) =>
{
using (var ofd = new OpenFileDialog())
{
ofd.Filter = "Text Files|*.txt|All Files|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
filePicker.TextContent = ofd.FileName;
}
}
};
Designer Support
The control includes a Smart Tag menu for quick setup.
| Category | Features |
|---|---|
Theme Presets |
Apply themes like Light, Dark, Material Blue, etc. |
Layout |
Quick toggles for Corner Radius and Border Width. |
Appearance |
Shortcuts for Placeholder text and ReadOnly mode. |
Usage Examples
Example 1: File Selection
Standard setup for picking a file.
private void SetupFilePicker()
{
filePicker.PlaceholderText = "Choose a document...";
filePicker.IsReadOnly = true; // Force use of button
// Set folder icon
filePicker.ButtonImageIdle = Properties.Resources.folder_icon;
filePicker.ButtonClick += (s, e) =>
{
using (var dialog = new OpenFileDialog())
{
if (dialog.ShowDialog() == DialogResult.OK)
{
filePicker.TextContent = dialog.FileName;
}
}
};
}
Example 2: Folder Selection
Using the picker for directory paths.
private void SetupFolderPicker()
{
folderPicker.PlaceholderText = "Select destination folder";
folderPicker.ButtonClick += (s, e) =>
{
using (var fbd = new FolderBrowserDialog())
{
if (fbd.ShowDialog() == DialogResult.OK)
{
folderPicker.TextContent = fbd.SelectedPath;
}
}
};
}
Example 3: Material Style
Applying a modern material design look.
private void ApplyMaterialStyle()
{
picker.PickerStyle = SiticoneFilePickerStyle.Material;
picker.BorderColor = Color.Gray;
picker.FocusBorderColor = Color.DeepSkyBlue;
// Remove background for true material feel
picker.BackgroundColor = Color.WhiteSmoke;
picker.ButtonColor = Color.Transparent;
}
Example 4: Read-Only Display
Using the control to display a path that cannot be changed.
private void ShowOutputPath(string path)
{
outputPicker.TextContent = path;
outputPicker.IsReadOnly = true;
// Customize disabled/readonly look
outputPicker.DisabledColors.BackgroundColor = Color.White;
outputPicker.DisabledColors.TextColor = Color.DarkSlateGray;
// Hide button since it's read-only
outputPicker.ButtonSize = 0;
}