Home
YKToolkit.Controls 取扱説明書
Contents
1. Configuration Display Legend ON MarkerVisible OFF YKToolkit Controls LineGraphItem IsMarkerEnabled Graph Data 4 Extended Controls YKToolkit Controls 4 13 LineGraph
2. MainWindow xaml MainWindow xaml cs Views ViewModels Models Views MainView xaml ViewModels MainViewModel cs App xaml StartupUri App xaml cs OnStartup 2 3 App xaml App xamlLcs 2 1 22 NUR Rw hm 2 WPF YKToolkit Controls oo e SampleSolution 1 4 SampleSolution b Properties b Models 4 ViewModels b cx MainViewModel cs 4 Views b MainView xaml 1 App config 4 App xaml b App xaml cs 2 3 MVVM 2 1 StartupUri App xaml lt Application x Class
3. 4 3 BusyIndicator 75 4 Extended Controls YKToolkit Controls BusyIndicator UI UI async await SampleModel DoHeavyWorkCore DoHeavyWorkAsync 0 DoHeavyWorkAsync 4 3 SampleModel SampleModel cs 1 namespace Section4_3 Models 2 3 using System Threading 4 using System Threading Tasks 5
4. _execute _canExecute private RaiseCanExecuteChanged CanExecuteChanged View CanExecuteChanged CommandManager RequerySuggested CanExecuteChanged View ViewModel RaiseCanExecuteChanged RaiseCanExecuteChanged static ClearCommand
5. ViewModel CommonDialogBehavior 5 2 CommonDialogBehavior Callback DialogType SaveFile OpenFile FileFi ileFiler IsMultiSelect true DialogType SaveFile Title 48 75 YKToolkit Controls 5 5 1 CommonDialogBehavior METI CT 1 lt YK Window x Class Section5_2 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 200
6. YKToolkit Controls WPF TextBox 60 75 YKToolkit Controls 5 5 16 TextBoxGotFocusBehavior MainView xaml 1 lt YK Window x Class Section5_10 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 xmlns YKb clr namespace YKToolkit Controls Behaviorsiassembly YKToolkit Controls 6 Title MainView Height 300 Width 300 gt 7 lt Grid gt 8 lt StackPanel gt 9 lt TextBox Text gt 10 lt TextBox Text 11 YKb TextBoxGotFocusBehavior SelectAlIOnGotFocus True gt 12 lt TextBox Text 13 YKb TextBoxGotFocusBehavior SelectAlIOnGotFocus False gt 14 lt TextBox Text Style x Null
7. UI 4 4 BusyIndicator ET lt YK Window x Class Section4_3 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls Title MainView Height 500 Width 500 WindowStartupLocation CenterScreen gt lt Grid gt NO Rw 24 75 YKToolkit Controls 4 Extended Controls 8 lt StackPanel VerticalAlignment Center gt 9 lt Button Content Click me Command Binding ButtonCommand Margin 20 gt 10 lt TextBlock Margin 20 gt 11 lt Run Text Messadge gt 12 lt Run Text Binding Message Mode OneWayj gt 13 lt TextBlock gt 14 lt StackPanel gt 15 16 lt YK BusyIndicator IsBusy Binding IsBusy gt 17 lt Grid gt 18 lt YK Window gt MainView SampleModel MainViewModel MainView ButtonCommand
8. await await async 4 5 BusyIndicator ViewModel SampleModel cs 1 namespace Section4_3 ViewModels 2 3 using Section4_3 Model 4 using YKToolkit Bindings 5 6 public class MainViewModel NotificationObject 7 8 lt summary gt 9 10 lt summary gt 11 private SampleModel model new SampleModel 0 12 13 region 14 private bool isBusy 15 lt summary gt 16 17 lt summary gt 18 public bool IsBusy 19 20 get return isBusyi 21 private set SetProperty ref isBusy value 22 23 private string message 24 lt summary gt 25 26 lt summary gt 27 public string Message 28 29 get return messade 30 set SetProperty ref message value 31 32 33 private DelegateCommand buttonCommandi 34 lt summary gt 35 36 lt summary
9. DragBehavior FileTreeview FileDropBehavior KeyDownBehavior ROHSdEOGNEBRIGBSIBSISNWNSK RoutedEvent Alt F4 SystemMenuBehavior TextBoxGotFocusBehavior TextBox WriteBitmapBehavior 5 2 CommonDialogBehavior
10. ET 1 lt Border Grid Row 1 gt 2 lt Border Backdround Purple 3 YKb WriteBitmapBehavior Callback Binding WriteBitmapCallback gt 4 lt Canvas gt 5 lt Ellipse Fill Orange Width 32 Height 32 6 Canvas Left 20 Canvas Top 40 7 gt 8 lt Rectangle Fil Green Width 32 Height 32 9 Canvas Right 10 Canvas Bottom 10 10 gt 11 lt Canvas gt 12 lt Border gt 13 lt Border gt 64 75 YKToolkit Controls 5 Section5 5 10 Border cacti CommonDialogBehavior ection5_2 Section5_3 DataGridBehavior Section5_5 DragBehavior Section5_6 FileDropBehavior Section5_7 KeyDownBehavior RoutedEventTriggerBehavior ection5_8 Section5 9 SystemMe
11. DLL HelpDocument chm YKToolkit 5 5 2 WPF YKToolkit Controls 2 WPF WPF MVVM INotifyPropertyChanged ICommand 2 1 MVVM WPF Visual Studio WPF 2 1 Visual C WPF b NET Framework 4 5
12. 2 7 UpdateSourceTrigger MainView xaml 1 lt TextBox Text Binding Text UpdateSourceTrigger PropertyChanged gt 24 1ICommand UL 5 2 WPF YKToolkit Controls ViewModel ICommand YKToolkit Controls dll ICommand ICommand DelegateCommand ICommand 2 8 DelegateCommand DelegateCommand cs namespace Section2 using System
13. 6 1 ComboBoxLineGraphMoveOperationModes ComboBoxLineGraphMoveOperationModes cs namespace YKToolkit Controls using System Collections Generic using System Windows Media Un kwh 66 75 YKToolkit Controls 6 ComboBox 6 lt summary gt 7 OperationModes 8 lt summary gt 9 public class ComboBoxLineGraphMoveOperationModes 10 11 lt summary gt 12 13 lt summary gt 14 public OperationModes Item get protected set 15 lt summary gt 16 17 lt summary gt 18 public string Name get protected set 19 20 lt summary gt 21 22 lt summary gt 23 public static List lt ComboBoxLineGraphMoveOperationModes gt Items get private set 24 25 lt summary gt 26 27 lt summary gt 28 lt param name item gt lt param gt 29 lt param name name gt lt param gt 30 public ComboBoxLineGraphMoveOperationModes OperationModes item stri
14. YKToolkit Controls dll Window System Windows Window YKToolkit Controls Window MainView System Windows Window YKToolkit Controls Window MainView xaml MainView xaml cs 3 3 XAML YKToolkit Controls Window MainView xaml lt YK Window x Class Section3_4 Views MainView 775 3 YKToolkit Controls dll YKToolkit Controls 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controls assembly YKToolkit Controls 5 Title MainView Height 300 Width 300 gt 6 lt Grid gt 7 8 lt Grid gt 9 lt YK Window gt 3 4 YKToolkit Controls Window MainView xaml cs 1 namespace Section3
15. YKToolkit Controls dll 3 2 NotificationObject View ViewModel INotifyPropertyChanged YKtoolkit Controls dll NotificationObject Text Result 3 1 NotificationObject MainViewModel cs 1 namespace Section3_2 ViewModels 2 3 using YKToolkit Bindings 4 5 public class MainViewModel NotificationObject 6 7 private string text 8 lt summary gt 9 10 lt summary gt 11 public string Text 12 13 get return text 14 set 15 16 if SetProperty ref text value 17 18 Result text ToUpper 19 20 21 22 23 private string result 24 lt summary gt 25 26 lt summary gt 27 public string Result 28 29 get return res
16. Transition Source Transition Direction 2 ComboBox Page1View UserControl YKToolkit Controls DataContext ViewModel XAML Page1ViewModel 4 20 Transition Page1View xaml 1 lt UserControl x Class Section4_12 Views Page1View 2 xmlns http schemas microsoft com winfx 2006 xaml presentation YKToolkit Controls 4 Extended Controls 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns mc http schemas openxmlformats org markup compatibility 2006 5 xmlns d http schemas microsoft com expression blend 2008 6 mcilgnorable d 7 d Des
17. UI MainView xaml 2 3 StackPanel TextBox TextBlock Button 2 4 2 3 MainView MainView xaml ooawmA wmN lt Window x Class Section2 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml Title MainView Height 300 Width 300 gt lt StackPanel gt lt TextBox Text Hello world gt lt TextBlock Text Hello world gt lt Button Content Click me gt lt StackPanel gt lt Window gt 1 MainView me Hello world Hello world Click me 2 4 2 3 INotifyPropertyChanged ViewModel INotifyPropertyChanged YKToolkit Controls dll
18. DataTrigger Value tx Null 74 75 YKToolkit Controls 8 a 2 b 2 8 2 ComparisonBinding 81 Section8 Section8_2 ComparisonBinding 75 5 2015 02 05 1 0 0 2015 03 13 1 1 0 2 YKToolkit Controls Ver 1 9 0 0 Extended Controls 2015 03 31 1 2 0 ComboBox Converter PANS 130 2015 04 13 1 3 1 WriteBitmapBehavior YKToolkit Controls 2015 02 05 2015 04 13 4 1 Copyright 2015 YKSoftware all right reserved
19. 2 2 App MainWindow PresentationCore PresentationFramework System Xaml WindowsBase 6 75 YKToolkit Controls 2 WPF SF El Ctr Section2 1 4 Section2 4 Properties b ce AssemblyInfo cs b Resources resx b Settings settinqs 4 sw Microsoft CSharp sm PresentationCore sm PresentationFramework mW System sm System Core Wm System Data sm System Data DataSetExtensions sm System Xaml sm System Xml sm System Xml Ling sm WindowsBase ya App config 4 MN App xaml b App xaml cs 4 MainWindow xaml b MainWindow xaml cs 2 2 WPF UI MVVM
20. 4 9 DropDownButton MainView xaml co NN URw hm lt YK Window x Class Section4_6 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt YK Window Resources gt lt gt lt DrawingBrush x Key AlphaBackgroundBrush ViewportUnits Absolute Viewport 0 0 10 10 TileMode Tile gt lt DrawingBrush Drawing gt lt DrawingGrouD gt lt GeometryDrawing Brush White gt lt GeometryDrawing Geometry gt lt RectangleGeometry Rect 0 0 100 100 gt lt GeometryDrawing Geometry gt lt GeometryDrawing gt lt GeometryDrawing Brush LightGray gt lt GeometryDrawing Geometry gt lt GeometryGrouD gt lt RectangleGeometry Rect 0 0 50 50 gt lt RectangleGeometry Rect 50 50 50 50 gt lt GeometryGrouD gt lt GeometryDrawing Geometry gt lt GeometryDrawing gt lt DrawingGrouD gt lt DrawingBrush Drawing gt lt DrawingBrush gt lt YKiWindow Resources gt lt StackPanel gt lt TextBlock Text gt lt YK DropDownButton Width 56 CloseTriggerValue Binding SelectedColor ElementName colorPickerj gt lt YK DropDownButton ButtonContent gt lt Border Background
21. Section4 11 TextBox Section4 12 Transitton Section4 13 TransitionControl 47 75 5 YKToolkit Controls 5 YKToolkit Controls dll YKToolkit 5 1 YKToolkit Controls dll YKToolkit Controls Behaviors 5 1 Cen GBSHaNiB DataGrid ES Dat SB 4
22. gt 24 lt CheckBox x Name TsAlphaValueEnabledChange Content gt 25 lt StackPanel gt 26 27 lt Grid Grid Row 1 Margin 10 gt 28 lt TextBlock Text 29 HorizontalAlignment Center 30 VerticalAlignment Center 31 gt 32 lt Rectangle Stroke LightGray gt 33 lt Rectangle Fill gt 34 lt SolidColorBrush Color Binding SelectedColor ElementName colorPicker gt 35 lt Rectangle Fill gt 36 lt Rectangle gt 37 lt Grid gt 38 39 lt YK ColorPicker Grid RowSpan 2 Grid Column 1 40 x Name colorPicker 41 HorizontalAlignment Center 42 VerticalAlignment Top 43 RecentColorsVisibility Binding IsChecked ElementName IsRecentColorEnabledChange Converter StaticResource BooleanToVisibilityConverterjj 44 IsAdvancedModeEnabled Binding IsChecked ElementName IsAdvancedModeEnabledChange 45 AlphaValueVisibility Binding IsChecked ElementName IsAlphaValueEnabledChange Converter StaticResource BooleanToVisibilityConverterjj 46 gt 47 lt Grid gt 48 lt YK Window gt 2 7 4 Extended Controls YKToolkit Controls Standard maa
23. 5 Advanced Theme Color Standard Color Ko 8095B3D7 Recent Color Transparent a b 4 3 ColorPicker 4 5 DirectorySelectDialog DirectorySelectDialog Window DirectorySelectDialog 4 7 DirectorySelectDialog MainView xaml D co IOJUA ww lt YK Window x Class Section4_5 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKb clr namespace YKToolkit Controls Behaviors assembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt Grid gt lt StackPanel Orientation Horizontal HorizontalAlignment Center VerticalAli
24. 8 2 ComparisonBinding Style Sstyle Trigger DataTrigger DataTrigger 8 1 DataTrigger MainView xaml O00 Nn uk kuwhm i lt YK Window x Class Section8_2 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKbind clr namespace YKToolkit Bindingsiassembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt StackPanel gt lt YK SpinInput Value fBinding Value Min 0 Max 10 Tick 1 gt lt Ellipse gt lt Ellipse Style gt lt Style TargetType x Type Ellipse gt lt Setter Property Width Value 32 gt lt Setter Property Height Value 32 gt lt Setter Property Fill Value Orange gt lt Style Triggers gt lt DataTrigger Binding tBinding Value Value 2 gt lt Setter Property Fill Value Cyan gt lt DataTrigger gt lt Style Triggers gt lt Style gt
25. YKToolkitControls YKToolkit Controls Window MainView 7 a b 3 1 YKToolkit Controls 187 8 YKToolkit Controls 3 YKToolkit Controls dIl YKToolkit Controls Window App xaml cs 3 5 MainView xaml cs 1 namespace Section3_4 2 3 Using Section3_4 Views 4 using System Windows 5 using YKToolkit Controls 6 7 lt summary gt 8 App xaml 9 lt summary gt 10 public partial class App Application 11 12 protected override void OnStartup StartupEventArds e 13 14 base OnStartup e 15 16
26. 3 275 4 Extended Controls YKToolkit Controls En 1 Standard _Advanced Pa ra 3 Param1 Param2 0 782A73D0 EE a MainView b ColorPicker DropDownButton 4 5 DropDownButton 4 7 FileTreeView FileTreeView amp FileTreeView 3 1 FileTreeVview 2 FileTreeVview ListBox 3 32775 YKToolki
27. INotifyPropertyChanged INotifyPropertyChanged INotifyPropertyChanged MainViewModel 2 4 INotifyPropertyChanged MainViewModel MainViewModel cs RCO DO namespace Section2 ViewModels using System ComponentModel public class MainView Model INotifyPropertyChanged 2 WPF YKToolkit Controls 7 region INotifyPropertyChanged 8 lt summary gt 9 10 lt summary gt 11 public event PropertyChangedEventHandler PropertyChanged 12 endregion INotifyPropertyChanged 13 14 lt summary gt 15 PropertyChanged 16 lt summary gt 17 lt param name propertyName gt lt param gt 18 protected virtual void RaisePropertyChanged string propertyName 19 20 var h PropertyChan
28. MainViewModel Text TextBox TextBox Tab TextBlock Text Result TextBlock Text a MainView EEC a MainView ee EEC input something IINPUT SOMETHING Click me Click me a b 2 5 Text View LostFocus MainViewModel PropertyChanged
29. Canvas 63 5 9 Border KKK KKK KKWulw 64 5 10 Border 65 6 1 ComboBoxLineGraphMoveOperationModes 69 7 1 InverseBooleanConverter true false 71 8 1 DataTrigger LLL 73 8 2 ComparisonBinding 75 1 1 YKToolkit SCPH 5 4 1 Extended Controls 21 4 2 ITransitionListttem 43 48 5 2 CommonDialogBehavior LE 48 6 1 ComboBox 66 6 2 ComboBox 66 7 1 IValueConverter 70 5 lt 72 74 2 1 StartupUri App xaml 8 2 2 OnStartup override App xaml CS uaauuu urara 8 2 3 MainVieW fl 9
30. Action lt stringll gt string l AllowDrop true 5 7 KeyDownBehavior KeyDownBehavior ICommand CanExecute 55 75 5 YKToolkit Controls ShiftCommand Shift 5 10 KeyDownBehavior MainView xaml Oo RODO lt YK Window x Class Section5_7 Views MainView xmlns
31. 5 17 WriteBitmapBehavior ET CT 1 lt YK Window x Class Section5_11 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 61 75 5 YKToolkit Controls xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKb clr namespace YKToolkit Controls Behaviorsiassembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt Grid gt lt Grid RowDefinitions gt lt RowDefinition gt lt RowDefinition Height 2 gt lt Grid RowDefinitions gt lt StackPanel gt lt Button Content Write Bitmap Command Binding WriteBitmapCommand gt lt StackPanel gt lt Border Grid Row 1 Background Purple gt lt Canvas YKb WriteBitmapBehavior Callback tBinding WriteBitmapCallback gt lt Ellipse Fill Orange Width 32 Height 32 Canvas Left 20 Canvas Top 40 gt lt Rectangle Fill Green Width 32 Height 32 Canvas Right 10 Canvas Bottom 10 lt Canvas gt lt Border gt lt Grid gt lt YK Window gt 5 18 WriteBitmapBehavior MainView xaml OOo JJ RODO namespace Section5_11 ViewModels using System using YKToolkit Bindings public c
32. ComboBox TickPlacement ComboBox ComboBoxLineGraphMoveOperationModes ComboBoxLineGraphZoomOperationModes ComboBoxTickPlacements BIS TransitionDirections ComboBox i TransitionModes ComboBox 6 2 6 2 ComboBox Items Item Name Item Name Items ComboBox ComboBoxLineGraphMoveOperationModes
33. YKToolkit Controls 2 WPF 49 lt summary gt 50 lt param name parameter gt lt param gt 51 lt returns gt true lt returns gt 52 public bool CanExecute object parameter 53 54 return _canExecute null true _canExecute parameter 55 56 57 lt summary gt 58 59 lt summary gt 60 public event System EventHandler CanExecuteChanged 61 62 add CommandManager ReduerySuggested valuei 63 remove CommandManager RequerySuggested value 64 65 66 lt summary gt 67 68 lt summary gt 69 lt param name parameter gt lt param gt 70 public void Execute object parameter 71 72 if execute null 73 _execute parameter 74 75 endregion ICommand 76 77 ICommand Execute CanExecute
34. a Cs Windows VisUal C Visual C 4 3 Windows Presentation Foundation WPF Visual C 4 Windows b Web Office SharePoint ASPNET Web Visual C Cloud a LightSwitch Visual C Reporting a siveright j Visual C Visual C WCF C Silverlight Visual C Workflow Silveright Visual C 4 Visual Basic pWCF Visual C b Visual C 4 LightSwitch VisUal C b N Section2 L D VisualStudioProjects B M Section2 D U gt 2 1 WPF
35. get private clearCommand null DelegateCommand Text Text 2 9 ClearCommand private DelegateCommand clearCommand lt summary gt lt summary gt public DelegateCommand ClearCommand get if clearCommand null clearCommand new DelegateCommand ooawm wm 27 2 WPF YKToolkit Controls 11 _ gt Text string Empty 12 _ gt string IsNulIOrEmpty Text 13 14 return clearCommandi 15 16 MainView 2 10 MainView ET 1 lt Window x Class Section2 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com w
36. lt summary gt public Action lt object bool gt WriteFileCallback get return writeFileCallbacki set SetProperty ref writeFileCallback value private void WriteFile object parameter bool result if result null amp amp result Value var filename parameter as string if Istring IsNullOrEmpty filename System Console WriteLine filename YKToolkit Controls YKToolkit Controls 5 WriteFileCallback null CommonDialogBehavior Callback null Callback Callback null 62 86 Callback Action lt object bool gt object string l
37. LineGraph 1 2 34 75 128 120 112 104 ge 88 80 64 iilse lt I Advanced Graph Lines Graph Data Shortcut Menu Display Legend Move Operation uo al Font Size Zoom Operation 2 Add MouseOver Information MarkerVisible Configuration Move Operation Zoom Operation None amp MouseOver Information ON
38. strng 5 3 DataGridBehavior DataGridBehavior DataGrid DisplayRowNumber int DataGrid DisplayRowNumber null 1 1 5 3 DataGridBehavior ET 1 lt YK Window x Class Section5_3 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 xmlns YKb clr namespace YKToolkit Controls Behaviors assembly YKToolkit Controls 6 Title MainView Height 300 Width 300 gt 7 lt Grid gt 8 lt DataGrid ItemsSource Binding People 9 YKb DataG
39. CommonDialogBehavior XAML Canvas WriteBitmapBehavior Write Bitmap 5 8 Canvas 637 75 5 YKToolkit Controls Canvas Background Canvas Border Border 5 19 Border MainView xaml 1 lt Border Grid Row 1 Background Purple 2 YKb WriteBitmapBehavior Callback Binding WriteBitmapCallback gt 3 lt Canvas gt 4 lt Ellipse Fill Orang
40. null Empty ExtensionFiliter FileTreeview FileTreeView amp YKToolkit Controls FileTreeNode 4 12 FileTreeView amp MainView xaml cs O00 Nnunk Rw namespace Section4_7 Views using System Windows Controls using YKToolkit Controls lt summary gt MainView xaml lt summary gt public partial class MainView Window public MainView InitializeComponent 3 3 6 4 Extended Controls YKToolkit Controls lt summary gt Dro
41. View TransitionControl 4 2 BarGraph BarGraph BarGraphittem XAML 4 1 BarGraph ET lt YK Window x Class Section4_2 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns sys clr namespace System assembly mscorlib Title MainView Height 400 Width 600 WindowStartupLocation CenterScreen gt lt Grid gt lt YKBarGraph Title YLabel gt lt YK BarGraph ItemsSource gt lt x Array Type x Type YK BarGraphItemj gt co Nuonkwmh O 2 25 4 Extended Controls YKToolkit Controls 13 lt YK BarGraphItem Title Data1 Fill Coral Stroke Coral Values Binding Data1 gt 14 lt YK BarGraphItem Title Data2 Fill Cyan Stroke Cyan Values Binding Data2 gt 15 lt x Array gt 16 lt YK BarGraph ItemsSource gt 17 lt YK BarGraph XAxisItemsSource gt 18 lt x Arr
42. 97 if 1 int f 10 0 0 98 d d gt 0 0 0 0 64 0 99 varx double i 100 vary 101 return new Point x y 102 103 104 105 4 9 MessageBox MessageBox MessageBox MVVM ViewModel View ViewModel MessageBox 4 15 MessageBox ET mm eo Nunnrkwmh lt YK Window x Class Section4_9 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt StackPanel gt lt Button Content Ok or Cancel
43. MainView xaml lt YK Window x Class Section6_3 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation 67 75 6 ComboBox YKToolkit Controls 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView Height 300 Width 300 gt 6 lt Grid gt 7 lt StackPanel gt 8 lt TextBlock Text gt 9 lt ComboBox ItemsSource Binding Source tx Static YK ComboBoxLineGraphMoveOperationModes Itemsj 10 Selectedltem Binding MoveOperationModeltem gt 11 lt ComboBox ItemTemplate gt 12 lt DataTemplate gt 13 lt TextBlock Text Binding Name gt 14 lt DataTemplate gt 15 lt ComboBox ItemTemplate gt 16 lt ComboBox gt 17 lt StackPanel gt 18 lt Grid gt 19 lt YK Window gt xStatic ComboBox Name DataTemplate ViewModel 6 3 ComboBoxLineGraphMoveOperationModes
44. 2 Binding style Ellipse Value MainViewModel Value Elliipse DataContext GT Greater Then gt 8 2 EQ LT lt LTE lt GT gt GTE gt NOT Value 2 null
45. 65 LS YKToolkit Controls 6 ComboBox 66 6 1 ee 66 6 2 66 6 3 67 64 2 EEKEKEKEKEK Te 69 7 ConverteF A k 66 4 464 1 70 AAA AAA 70 70 7 1 71 8 72 8 1 kk 8 2 ComparisonBinding 1 YKToolkit Controls gt 5 6 2 2 7 2 3 MVVM 8 9 2 5 Text eI 11 2 6 ClearCommand i 14 3 1 s YKToolkit Controls 0 0000 ie 18 3 2 ee 20 RaTG pa 23 4 2 BusyIndicator 26 4 3 ColorPicker 28 4 4 DirectorySelectDialog L111UUILILILILILIE LE 29 4 5 DropDown
46. 2 4 INotifyPropertyChanged MainViewModel 9 22 0 0 Re 10 2 6 MainView uaaiuuuuuruiuiatneneererettreeteeeeteteeteeeeeeeeeeteeeeeeee 11 2 7 UpdateSourceTrigger 11 2 8 DelegateCommand ie 12 2 9 ClearCommand 13 YKToolkit Controls 2 10 MMIMM ae 14 3 1 NotificationObject i 16 3 2 DelegateCommand 17 3 3 XAML YKToolkit Controls Window TETELUEKELETMMLELEM 17 3 4 YKToolkit Controls Window 18 SR 19 3 6 19 4 1 BarGraph 21 4 2 BarGraph ViewModel LLLEULE 22 4 3 SampleModel 24 4 4
47. DirectorySelectDialogBehavior RoutedEvent Title DirectoryName 3 RoutedEvent Title DirectorySelectDialog DirectorySelectDialog OK DirectorySelectDialogBehavior DirectoryName DirectorySelectDialog OK MainView TextBox DropDownButton Button ColorPicker 4 Extended Controls YKToolkit Controls DropDownButton
48. XAxisItemsSource BarGraphltem Title Fil XAML Values ViewModel XAML ViewModel Model ViewModel 4 2 BarGraph ViewModel MainViewModel cs 1 namespace Section4_2 ViewModels 2 3 using System Collectionsi 4 using System Lindi 5 using YKToolkit Bindinds 6 F public class MainViewModel NotificationObject 8 9 lt summary gt 10 11 lt summary gt 12 public MainViewModel 13 14 SetRandomData 15 16 17 region 18 private IEnumerabl
49. true false Boolean Visible Hidden Collapsed Visibility StaticResource 26 75 YKToolkit Controls 4 Extended Controls 4 6 ColorPicker ET 1 lt YK Window x Class Section4 4 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView Height 400 Width 500 6 WindowStartupLocation CenterScreen gt 7 lt YK Window Resources gt 8 lt BooleanToVisibilityConverter x Key BooleanToVisibilityConverter gt 9 lt YK Window Resources gt 10 11 lt Grid gt 12 lt Grid RowDefinitions gt 13 lt RowDefinition gt 14 lt RowDefinition gt 15 lt Grid RowDefinitions gt 16 lt Grid ColumnDefinitions gt 17 lt ColumnDefinition gt 18 lt ColumnDefinition gt 19 lt Grid ColumnDefinitions gt 20 21 lt StackPanel VerticalAlignment Center HorizontalAlignment Center gt 22 lt CheckBox x Name 1sRecentColorEnabledChange Content gt 23 lt CheckBox x Name IsAdvancedModeEnabledChange Content
50. 56 5 12 KeyDownBehavior 57 5 13 RoutedEventTriggerBehavior 58 5 14 RoutedEventTriggerBehavior 59 5 15 SystemMenuBehavior 60 5 16 TextBoxGotFocusBehavior 61 5 17 WriteBitmapBehavior 61 5 18 WriteBitmapBehavior 62 5 19 Border UU 64 5 20 Border LiLLELUEUIEIEIEIEILILILILL 64 6 1 ComboBoxLineGraphMoveOperationModes Ne 66 6 2 ComboBoxLineGraphMoveOperationModes 67 6 3 ComboBoxLineGraphMoveOperationModes 68 7 1 ComboBoxLineGraphMoveOperationModes 70 8 1 DataTrigger I 72 Ns8 2 DataTfiggen 72 8 3 DataTrigger TT 73 4 75
51. MainViewModel cs OoO JJ ROD namespace Section6_3 ViewModels using System Lindi using YKToolkit Bindings using YKToolkit Controls public class MainView Model NotificationObject public MainViewModel MoveOperationMode ComboBox MoveOperationMode OperationModes None private ComboBoxLineGraphMoveOperationModes moveOperationModeltem ComboBoxLineGraphMoveOperationModes Items O1 lt summary gt lt summary gt public ComboBoxLineGraphMoveOperationModes MoveOperationModeltem get return moveOperationModeltem set if SetProperty ref moveOperationModeltem value MoveOperationMode moveOperationModeltem Item private OperationModes moveOperationMode YKToolkit Controls 6 ComboBox 32 lt summary gt 33 34 lt summary gt 35 public OperationModes MoveOperationMode 36 37 get return moveOperationMode 38 set 39 40 if SetProperty ref moveOperationMode value 41 42 MoveOperationModeltem ComboBoxLineGraphMoveOperationModes Items FirstOrDefault item gt item Item
52. Name Type object Type Transition 4 19 Transition ET lt YK Window x Class Section4_12 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns vw clr namespace Section4_12 Views 43 75 4 Extended Controls YKToolkit Controls 6 Title MainView Height 300 Width 300 gt 7 lt Grid gt 8 lt Grid RowDefinitions gt 9 lt RowDefinition Height Auto gt 10 lt RowDefinition gt 11 lt Grid RowDefinitions gt 12 13 lt StackPanel gt 14 lt ComboBox x Name ScreenSelector SelectedIindex 0 gt 15 lt ComboBox ItemsSource gt 16 lt x Array Type tx Type YK TransitionListItem gt 17 lt YK TransitionListItem Name Page1 Type tx Type vw Page1Viewj gt 18 lt YK TransitionListItem Name Page2 Type tx Type vw Page2Viewj gt 19 lt YK TransitionListItem Name Page3 Type tx Type vw Page3Viewj gt 20 lt x Array gt 21 lt ComboBox ItemsSource gt 22 lt ComboBox ItemTemplate gt 23 lt DataTemplate gt 24 lt
53. i ToString 18 Age 20 i 19 20 21 22 private ObservableCollection lt Person gt people 23 lt summary gt 24 25 lt summary gt 26 public ObservableCollection lt Person gt People 27 28 get return people 29 set SetProperty ref people value 30 31 32 2 7 YKToolkit Controls 5 1 2 3 4 6 7 8 9 5 1 DataGridBehavior 5 4 DirectorySelectDialogBehavior DirectorySelectDialogBehavior DirectorySelectDialog 4 5 5 5 DragBehavior DragBehavior FileTreeView 5 6 DragBehavior MainView xaml Co RODO lt YK Window x Class
54. 17 ThemeManager Initialize Light 18 19 varw new MainView 20 w Show 21 Button TextBox XAML YKToolkit Controls dll XAML 3 6 MainView xaml cs 1 lt YK Window x Class Section3_5 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView Height 300 Width 300 gt 6 lt StackPanel gt 7 lt TextBox Text nput text gt 8 lt Button Content Click me gt 9 lt CheckBox Content Check me IsThreeState True gt 10 lt ComboBox SelectedIndex 0 gt 11 lt ComboBoxItem gt Item1 lt ComboBoxltem gt 12 lt ComboBoxItem gt Item2 lt ComboBoxltem gt 13 lt ComboBoxItem gt Item3 lt ComboBoxltem gt 14 lt ComboBox gt 15 lt StackPanel gt 16 lt YK Window gt 3 YKToolkit Controls dll YKToolkit Controls Input text
55. Oo RODO private string text lt summary gt lt summary gt public string Text det return text set if text value text value Result text ToUpper RaisePropertyChanged Text private string result lt summary gt lt summary gt public string Result get return result set YKToolkit Controls 2 WPF 27 28 if result value 29 30 result value 31 RaisePropertyChanged Result 34 MainView 2 6 MainView ET lt Window x Class Section2 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml Title MainView Height 300 Width 300 gt lt StackPanel gt lt TextBox Text Binding Text gt lt TextBlock Text Binding Result gt lt Button Content Click me gt lt StackPanel gt lt Window gt oo Buton TextBox
56. 4 18 TextBe O 42 4 19 Transition cc a aiiinaneteteneteteteneseeeeteeeteeeneseeeeteneeeeteneneneeenenenenenenenenenneennn 43 420 Transition 44 4 21 TransitionControl 45 5 1 CommonDialogBehavior 49 5 2 CommonDialogBehavior 49 5 3 DataGridBehavior 51 5 4 DataGridBehavior 51 5 5 DataGridBehavior 52 5 6 DragBehavior 53 57 DragBehavior 54 5 8 FileDropBehavior 55 5 9 FileDropBehavior 55 5 10 KeyDownBehavior 56 5 11 KeyDownBehavior
57. Click me Check me Item1 3 2 35 Section3_2 Section2 YKToolkit Controls Se YKToolkit Controls Window Section3 Section3 5 YKToolkit Controls Window 20 75 YKToolkit Controls 4 Extended Controls 4 Extended Controls YKToolkit Controls dll Extended Controls YKToolkit 4 1 YKToolkit Controls dll Extended Controls Extended Controls 4 1 Extended Controls HUG BarGraph BusyI
58. get return okCancelCommand okCancelCommand new DelegateCommand _ gt ViewModel Window MVVM var result MessageBox Show OK Cancel MessageBoxButton OKCancel MessageBoxImage Question OkCancelText resut ToString private DelegateCommand yesNoCancelCommandi lt summary gt Yes No Cancel lt summary gt public DelegateCommand YesNoCancelCommand get 3 75 4 Extended Controls YKToolkit Controls 54 55 return yesNoCancelCommand yesNoCancelCommand new DelegateCommand _ gt 56 57 ViewModel Window 58 MVVM 59 60 var result MessageBox Show Yes No Cancel MessageBoxButton YesNoCancel MessageBoxlmage Warning 61 YesNoCancelText result ToString 62 63 64 65 66 MessageBox Show YKTool
59. DelegateCommand ClearCommand 3 2 DelegateCommand MainViewModel cs private DelegateCommand clearCommand lt summary gt lt summary gt public DelegateCommand ClearCommand get O00 Nn unk kwh i if clearCommand null 10 clearCommand new DelegateCommand 11 _ gt Text string Empty 12 _ gt string IsNulIOrEmpty Text 13 14 return clearCommandi 16 34 WPF ControlTemplate YKToolkit Controls dll
60. ET 1 lt YK Window x Class Section4_8 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView 6 Width 800 Height 600 7 WindowStartupLocation CenterScreen gt 8 lt Grid gt 9 lt Grid RowDefinitions gt 10 lt RowDefinition Height Auto gt 11 lt RowDefinition gt 12 lt Grid RowDefinitions gt 13 14 lt Button Content Update Command fBinding UpdateCommand HorizontalAlignment Left Margin 5 gt 15 16 lt YK LineGraph Grid Row 1 17 Title 18 XLabel 19 YLabel 20 Y2Label 2 21 XMin 0 XMax 100 XStep 10 XDecimal 0 22 YMin 10 YMax 10 YStep 2 YDecimal 1 23 Y2Min 0 Y2Max 128 Y2Step 8 Y2Decimal 0 24 IsSecondEnabled True 25 IsLegendEnabled True 26 IsMouseOverInformationEnabled True gt 27 lt YKiLineGraph ItemsSource gt 28 lt x Array Type x Type YK LineGraphItem gt 29 lt YK LineGraphitem Title Datal Stroke Coral MarkerType Ellipse Points Binding Datal gt 30 lt YK LineGraphItem Title Data2 Stroke Cyan MarkerType Triangle Points Binding Data2 gt 31 lt YK LineGraphitem Title Data3 Stroke Green IsMarkerEnabled False Poin
61. gt 15 lt StackPanel gt 16 lt Grid gt 17 lt YK Window gt 4 5 6 TextBoxGotFocusBehavior TextBox 4 YKToolkit Controls WPF TextBox TextBoxGotFocusBehavior YKToolkit Controls WPF WPF TextBox 2 TextBox 5 11 WriteBitmapBehavior WriteBitmapBehavior
62. lt Ellipse Style gt lt Ellipse gt lt StackPanel gt lt YK Window gt 8 2 DataTrigger MainViewModel cs wh namespace Section8_2 ViewModels using YKToolkit Bindings 2 78 YKToolkit Controls 8 5 public class MainView Model NotificationObject 6 7 private int_value 8 lt summary gt 9 10 lt summary gt 11 public int Value 12 13 get return _valuei 14 set SetProperty ref _value value 15 16 17 Value 2 a 2 b 2 8 1 DataTrigger x x ComparisonBinding XAML ComparisonBinding 8 3 DataTrigger UESAC lt YK
63. using System Windows Input public class DelegateCommand ICommand lt summary gt lt summary gt private Action lt object gt _execute lt summary gt lt summary gt private Func lt object bool gt _canExecute lt summary gt lt summary gt lt param name execute gt lt param gt public DelegateCommand Action lt object gt execute this execute null lt summary gt lt summary gt lt param name execute gt lt param gt lt param name canExecute gt lt param gt public DelegateCommand Action lt object gt execute Func lt object bool gt canExecute _eXeCUte eXeCUt6 _CanExecute canExecute lt summary gt CanExecuteChanged lt summary gt public static void RaiseCanExecuteChanged CommandManager InvalidateRequerySuggested region ICommand lt summary gt
64. 6 public class SampleModel 7 8 lt summary gt 9 10 lt summary gt 11 lt returns gt lt returns gt 12 public Task DoHeavyWorkAsync 13 14 return Task Run gt 15 16 DoHeavyWorkCore 17 18 19 20 lt summary gt 21 22 lt summary gt 23 private void DoHeavyWorkCore 24 25 10 s 26 Thread Sleep 10000 27 28 29 BusyIndicator Button TextBlock StackPanel BusyIndicator BusyIndicator IsBusy true StackPanel BusyIndicator Message TextBlock BusyIndicator
65. Command fBinding OkCancelCommand gt lt TextBlock Text Binding OkCancelText gt lt Button Content Yes No or Cancel Command tBinding YesNoCancelCommand gt lt TextBlock Text Binding YesNoCancelText gt lt StackPanel gt 38 YKToolkit Controls 4 Extended Controls 12 lt YK Window gt 4 16 Message ViewModel MainViewModel cs O00 Nnunk kuwhm i namespace Section4_9 ViewModels using YKToolkit Bindings using YKToolkit Controls public class MainViewModel NotificationObject private string okCancelText lt summary gt OkCancel lt summary gt public string OkCancelText get return okCancelText null private set SetProperty ref okCancelText value private string yesNoCancelText lt summary gt YesNoCancel lt summary gt public string YesNoCancelText get return yesNoCancelText null private set SetProperty ref yesNoCancelText value private DelegateCommand okCancelCommand lt summary gt Ok Cancel lt summary gt public DelegateCommand OkCancelCommand
66. Section2 App xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml gt lt Application Resources gt lt Application Resources gt lt Application gt 2 2 OnStartup override App xaml cs App xaml cs Oo ROD namesDpace Section2 using System Windows using Section2 Views using Section2 ViewModels lt summary gt App xaml lt summary gt public partial class App Application protected override void OnStartup StartupEventArds e base OnStartup e varw new MainView var vm new MainViewModel w DataContext vmi w Show YKToolkit Controls 2 WPF MainView DataContext MainViewModel MainView MainViewModel ViewModel INotifyPropertyChanged ICommand 2 2 UI
67. StaticResource AlphaBackgroundBrush HorizontalAlignment Center VerticalAlignment Center gt lt Rectangle Width 16 Height 16 gt lt Rectangle Stroke gt lt SolidColorBrush Color DynamicResource BorderColorJ gt lt Rectangle Stroke gt lt Rectangle Fil gt lt SolidColorBrush Color tBinding SelectedColor ElementName colorPicker gt lt Rectangle Fil gt lt Rectangle gt lt Border gt lt YK DropDownButton ButtonContent gt lt YK ColorPicker x Name colorPicker RecentColorsVisibility Visible gt lt YKiDropDownButton gt lt Separator Margin 0 20 gt lt TextBlock Text gt lt YK DropDownButton gt lt YK DropDownButton ButtonContent gt lt TextBlock TextAlignment Center gt YKToolkit Controls 4 Extended Controls 52 lt Run Text Binding Param1 Mode OneWay gt 53 lt Run Text gt 54 lt Run Text Binding Param2 Mode OneWay gt 55 lt TextBlock gt 56 lt YK DropDownButton ButtonContent gt 57 58 lt StackPanel Margin 10 10 0 0 gt 59 lt StackPanel Orientation Horizontal gt 60 lt TextBlock Text Param1 VerticalAlignment Center gt 61 lt TextBox Text Binding Param1 MinWidth 200 gt 62 lt StackPanel gt 63 lt StackPanel Orientation Horizontal Margin 0 10 0 0 gt 64 lt TextBlock Text Param2 VerticalAlignment Center gt 65 lt TextBox Text Bindi
68. moveOperationMode 43 44 45 46 47 ComboBox MoveOperationModettem MoveOperationMode MoveOperationModeIttem ComboBox MoveOperationMode System Linq 1 6 1 ComboBoxLineGraphMoveOperationModes 54 ComboBoxLineGraphMoveOperationModes Section6 Section6_3 69 75 7 Converter YKToolkit Controls Converter 7 1 View 7 1 IValueConverter BO
69. 45 lt YK Window gt ComboBox TrnsitionControl Content TransitionControl Content ComboBox 46 75 YKToolkit Controls 4 14 Section4 4 Extended Controls Section4 2 BarGraph Section4 3 BusyIndicator Section4 4 ColorPicker Section4 5 DirectorySelectDialog Section4_6 DropDownButton Section4 7 FileTreeView Section4_8 LineGraph Section4_9 MessageBox Section4_10 SpinInput
70. 6 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 xmlns YKb clr namespace YKToolkit Controls Behaviorsiassembly YKToolkit Controls 6 Title MainView Height 300 Width 300 gt 7 lt StackPanel gt 8 lt Button Content Read File 9 Command Binding ReadFileCommand 10 YKb CommonDialogBehavior Title 11 YKb CommonDialogBehavior lsMultiSelect True 12 YKb CommonDialogBehavior FileFilter CSV csv csv 13 YKb CommonDialogBehavior DialogType OpenFile 14 YKb CommonDialogBehavior Callback Binding ReadFileCallback 15 16 lt Button Content Write File 17 Command Binding WriteFileCommand 18 YKb CommonDialogBehavior Title 19 YKb CommonDialogBehavior FileFilter HTML html htm html htm NEI 20 YKb CommonDialogBehavior DialogType SaveFile 21 YKb CommonDialogBehavior Callback Binding WriteFileCallback 22 gt 23 lt StackPanel gt 24 lt YK Window gt 5 2 CommonDialogBehavior MainViewModel cs 1 namespace Section5_2 ViewModels 2 3 using System 4 using YKToolkit Bindings 5 6 public class MainView Model NotificationObject 7 8 private DelegateCommand readFileCommandi 9 lt summ
71. BusyIndicator 24 4 5 BusyIndicator ViewModel 25 4 6 ColorPicker 2 OU 2 Me 27 4 7 DirectorySelectDialog 28 4 8 DirectorySelectDialog ViewModel Lk 28 4 9 DropDownButton 30 4 10 DropDownButton ViewModel 31 4 11 5 FileTreeView ccacuurirntntteteneneeteneneeeeteneneeneneneneeneneneneenenenenenenennen 33 4 12 FileTreeView amp wm es 33 4 13 LineGraph 36 4 14 LineGraph ViewModel 36 4 15 MessageBox EE 38 4 16 Message ViewModel 39 4 17 SpinInput 40
72. Button 32 4 6 FileTreeView 33 4 7 LineGraph I 35 4 8 LineGraph 35 4 9 MessageBox 40 4 10 SpinInput LLLELIL 42 411 TextBox RN 43 4 12 Transition LL 45 5 1 DataGridBehavior LLL 53 5 2 DragBehavior 54 5 3 KeyDownBehavior 58 5 4 RoutedEventTriggerBehavior 60 5 5 SystemMenuBehavior LLL 60 5 6 TextBoxGotFocusBehavior 61 5 7 3 SystemMenuBehavior LIE 63 5 8
73. C St bool TVeiseDBERESVSRST Dock NadatiVeDUbISGOiNyerte double 7 2 InverseBooleanConverter XAML Window UserControl Resources StaticResource 7 1 ComboBoxLineGraphMoveOperationModes ET CT 1 lt YK Window x Class Section7_2 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView Height 300 Width 300 gt 6 lt YK Window Resources gt 7 lt YK InverseBooleanConverter x Key InverseBooleanConverter gt 8 lt YK Window Resources gt 9 lt StackPanel gt 10 lt CheckBox x Name checkbox1 Content Check me gt 11 lt CheckBox Conten
74. Grid Column 3 x Name Delay Min 0 Value 500 gt lt YK SpinInput Grid Row 2 Grid Column 3 x Name 1nterval Min 0 Value 100 gt lt TextBlock Grid Row 3 Text FontSize gt lt YK SpinInput Grid Row 3 Grid Column 1 Grid ColumnSpan 3 x Name input Min Binding Value ElementName Min Max Binding Value ElementName Max Decimal Binding Value ElementName Decimali Tick Binding Value ElementName Tick Delay Binding Value ElementName Delay Interval Binding Value ElementName Intervali Value Binding Input gt lt TextBlock Grid Row 4 Grid ColumnSpan 4 Text TextAlignment Left FontSize Binding Value ElementName input gt lt Grid gt lt YK Window gt 41 75 4 Extended Controls YKToolkit Controls 7 Tick Delay Interval Ei 4 10 SpinInput 4 11 TextBox TextBox System Windows Controls TextBox TextBox 4 18 TextBox MainView xaml 1
75. Section5_5 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKb clr namespace YKToolkit Controls Behaviors assembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt Grid gt lt Grid ColumnDefinitions gt lt ColumnDefinition gt lt ColumnDefinition gt lt Grid ColumnDefinitions gt lt Ellipse Fill Orange Width 32 Height 32 YKb DragBehavior IsEnable True gt lt Rectangle Grid Column 1 Fill Cyan Width 32 Height 32 AllowDrop True Drop Rectangle_Drop gt lt TextBlock Grid ColumnSpan 2 Text TextWrapping Wrap Oo 5 YKToolkit Controls 25 VerticalAlignment Top gt 26 lt Grid gt 27 lt YK Window gt 5 7 DragBehavior MainView xaml cs 1 namespace Section5_5 Views 2 3 using YKToolkit Controls 4 5 lt summary gt 6 MainView xaml 7 lt summary gt 8 public partial class MainView Window 9 10 public MainView 11 12 InitializeComponent 13 14 15 priv
76. TextBlock Text Binding Name gt 25 lt DataTemplate gt 26 lt ComboBox ItemTemplate gt 27 lt ComboBox gt 28 29 lt ComboBox x Name direction SelectedIindex 0 gt 30 lt ComboBox ItemsSource gt 31 lt X Array Type x Type YK TransitionDirections gt 32 lt YK TransitionDirections gt ToLeft lt YK TransitionDirections gt 33 lt YK TransitionDirections gt ToTop lt YK TransitionDirections gt 34 lt YKTransitionDirections gt ToRight lt YK TransitionDirections gt 35 lt YK TransitionDirections gt ToBottom lt YK TransitionDirections gt 36 lt X Array gt 37 lt ComboBox ItemsSource gt 38 lt ComboBox gt 39 lt StackPanel gt 40 41 lt YK Transition Grid Row 1 42 Source Binding SelectedItem ElementName ScreenSelector 43 Direction Binding SelectedItem ElementName direction 44 gt 45 lt Grid gt 46 lt YK Window gt 1 ComboBox ITransitionListttem TransitionListItem Name Type Type vw Page View Page View ComboBox
77. TextBox 2 6 ClearCommand 14 75 YKToolkit Controls 2 WPF 5 oD INotifyPropertyChanged ICommand 15 75 3 YKToolkit Controls dll YKToolkit Controls 3 YKToolkit Controls dll YKToolkit Controls dll MVVM YKToolkit Controls dll MVVM YKToolkit Controls dll
78. Window x Class Section8_2 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKbind clr namespace YKToolkit Bindingsiassembly YKToolkit Controls Title MainView Height 300 Width 300 gt lt StackPanel gt lt YK SpinInput Value fBinding Value Min 0 Max 10 Tick 1 gt lt Ellipse gt lt Ellipse Style gt lt Style TargetType x Type Ellipse gt lt Setter Property Width Value 32 gt m DD oO 73 75 8 YKToolkit Controls 13 lt Setter Property Height Value 32 gt 14 lt Setter Property Fill Value Orange gt 15 lt Style Triggers gt 16 lt DataTrigger Binding YKbind ComparisonBinding DataContext Value GT 2 Value x Null gt 17 lt Setter Property Fill Value Cyan gt 18 lt DataTrigger gt 19 lt Style Triggers gt 20 lt Style gt 21 lt Ellipse Style gt 22 lt EIllipse gt 23 lt StackPanel gt 24 lt YK Window gt ComparisonBinding Binding Binding DataContext Value GT
79. YKToolkit Controls Ver 1 3 1 2015 YKSoftware YKToolkit Controls 1 1 1 2 1 3 5 Ui YKToolkit WI eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 6 MVVM kb 6 UI ICommand 11 15 gt 2 YKToolkit Controls dll 7 16 1 NotificationObject DelegateCommand BarGrab ho RR BusyIndicator GEolSPIieke DireeterySselectDialod sha 0 CO DR ES 28 DropDownButton FileTreeVieW LineGreph MessageBOoX SpinInput TextBox Transition TransitionControl gt gt 48 JNI NN REIS EEE ESE oa iin ti tii ii sina ve CommonDialogBehaVigr ee 48 DataGridBehavior DirectorySelectDialogBehavior II 53 Dra Be FileDropBehavior KeyDownBehavior II 55 RoutedEventTriggerBehaviOor 58 SystemMenuBehavior TextBoxGotFocusBehavior 60 WriteBitmapBehaViOr ssoe aasasbsvssisasnasssieeans nnd sari 61
80. YKToolkit Controls 1 1 1 WPF YKToolkit Controls dIl WPF 1 2 Windows7 Professional SP1 32 Visual Studio Professional 2013 Update4 1 3 YKToolkit 1 YKToolkit YKToolkit Controls dll HelpDocument chm YKToolkit dll 1 1 YKToolkit DLL YKToolkit AAF1170 dll NLS DLL YKToolkit Controls dll WPF
81. _4 Views 2 3 using YKToolkit Controls 4 5 lt summary gt 6 MainView xaml 7 lt summary gt 8 public partial class MainView Window 9 10 public MainView 11 12 InitializeComponent 13 14 15 XAML YKtoolkit Controls xmins YK YK Window YK Window System Windows Window YKToolkit Controls Window MainView xaml cs MainView xaml MainView partial XAML System Windows Window YKToolkit Controls Window
82. ary gt 10 11 lt summary gt 12 public DelegateCommand ReadFileCommand 13 14 get 15 16 return readFileCommand readFileCommand new DelegateCommand _ gt 17 18 ReadFileCallback ReadFile 19 20 21 22 23 private DelegateCommand writeFileCommandi 24 lt summary gt 25 26 lt summary gt 49 75 5 public DelegateCommand WriteFileCommand get return writeFileCommand writeFileCommand new DelegateCommand _ gt WriteFileCallback WriteFile private Action lt object bool gt readFileCallback lt summary gt lt summary gt public Action lt object bool gt ReadFileCallback get return readFileCallback set SetProperty ref readFileCallback value private void ReadFile object parameter bool result if result null amp amp result Value var filenames parameter as string if filenames null foreach var filename in filenames System Console WriteLine filename ReadFileCallback null private Action lt object bool gt writeFileCallback lt summary gt
83. ate void Rectangle_Drop object sender System Windows DragEventArgs e 16 17 foreach var format in e Data GetFormats 18 19 System Console WriteLine format 20 21 22 23 inVie En lt 5 2 DragBehavior Mainview Drop ViewModel 5 6 FileDropBehavior 54 75 YKToolkit Controls 5 FileDropBehavior 5 8 FileDropBehavior ET 1 lt YK Window x Class Section5_6 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 xmlns YKb clr namespace YKToolkit C
84. ay Type x Type sys String gt 19 lt sys String gt lt sys String gt 20 lt sys String gt lt sys String gt 21 lt x Array gt 22 lt YK BarGraph XAxisltemsSource gt 23 lt YK BarGraph XAxisItemTemplate gt 24 lt DataTemplate gt 25 lt TextBlock Text Binding TextAlignment Center gt 26 lt DataTemplate gt 27 lt YK BarGraph XAxisItemTemplate gt 28 lt YK BarGraph BorderBrush gt 29 lt SolidColorBrush Color DynamicResource BorderColor gt 30 lt YK BarGraph BorderBrush gt 31 lt YK BarGraph Background gt 32 lt SolidColorBrush Color DynamicResource WindowColor gt 33 lt YK BarGraph Background gt 34 lt YK BarGraph gt 35 lt Grid gt 36 lt YKiWindow gt Grid BarGraph ItemsSource BarGraphItem IEnumerable 12 lt x Array gt IEnumerable 17 BarGraphltem
85. e Width 32 Height 32 5 Canvas Left 20 Canvas Top 40 6 7 lt Rectangle Fill Green Width 32 Height 32 8 Canvas Right 10 Canvas Bottom 10 9 10 lt Canvas gt 11 lt Border gt Canvas WriteBitmapBehavior Border Write Bitmap 5 9 Border Grid Grid Row 0 Grid Column 0 Border Grid Border 5 20 Border
86. e data1 19 lt summary gt 22 75 YKToolkit Controls 4 Extended Controls 1 lt summary gt public IEnumerable Data1 get return datal set SetProperty ref datal value private IEnumerable data2 lt summary gt 2 lt summary gt public IEnumerable Data2 get return data2 set SetProperty ref data2 value endregion lt summary gt lt summary gt private void SetRandomData var rnd new System Random Datal Enumerable Range 0 3 Select _ gt rnd Next 20 80 Data2 Enumerable Range 0 3 Select _ gt rnd Next 20 80 2 Data1 Data2 4 1 BarGraph BarGraph
87. gedi 21 if h null 22 h this new PropertyChangedEventArgs propertyName 23 24 25 INotifyPropertyChanged View ViewModel ViewModel RaisePropertyChanged Text Result get private set private private RaisePropertyChanged View Text Resut 2 5 MainViewModel cs
88. gnment Center gt lt TextBox Text Binding DirectoryName Width 200 Margin 10 0 gt lt Button Content YKb DirectorySelectDialogBehavior RoutedEvent Button Click YKb DirectorySelectDialogBehavior Title YKb DirectorySelectDialogBehavior DirectoryName Binding DirectorName gt lt StackPanel gt lt Grid gt lt YK Window gt 4 8 DirectorySelectDialog ViewModel MainViewModel cs oo awmA wm namespace Section4_5 ViewModels using YKToolkit Bindings public class MainView Model NotificationObject private string directoryName lt summary gt lt summary gt 28 75 DirectoryName directoryName SetProperty ref directoryName DirectorySelectDialog Window XAML YKToolkit Controls Behavior DirectorySelectDialogBehavior
89. gt 37 public DelegateCommand ButtonCommand 38 39 get 425 75 4 Extended Controls YKToolkit Controls 40 41 if buttonCommand null 42 buttonCommand new DelegateCommand _ gt 43 44 DoCommand 45 46 return buttonCommandi 47 48 49 endregion 50 51 lt summary gt 52 53 lt summary gt 54 private async void DoCommand 55 56 Message 57 IsBusy true 58 59 60 await model DoHeavyWorkAsync 61 62 lsBusy false 63 Message 64 65 66 Click me a b 4 2 BusyIndicator 4 4 ColorPicker ColorPicker UI DropDownButton ColorPicker UI 8 BooleanToVisibilityConverter
90. http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls Title MainView Height 300 Width 300 YKb KeyDownBehavior Key Escape YKb KeyDownBehavior Command Binding MinimizeCommand YKb KeyDownBehavior ShiftCommand Binding MaximizeCommand gt lt Grid gt lt StackPanel gt lt CheckBox Content IsEnabled IsChecked Binding IsEnabled gt lt TextBlock Text ESC Shift ESC TextWrapping Wrap gt lt StackPanel gt lt Grid gt lt YK Window gt 5 11 KeyDownBehavior MainViewModel cs O00 Nu Rw namespace Section5_7 ViewModels using YKToolkit Bindings public class MainViewModel NotificationObject private bool isEnabledi lt summary gt lt summary gt public bool IsEnabled get return isEnabled set SetProperty ref isEnabled value private DelegateCommand minimizeCommand lt summary gt lt summary gt public DelegateCommand MinimizeCommand get return minimizeCommand minimizeCommand ne
91. ignHeight 300 d DesignWidth 300 8 xmlns vm clr namespace Section4_12 ViewModels 9 Background Coral gt 10 lt UserControl DataContext gt 11 lt vm Page1ViewModel gt 12 lt UserControl DataContext gt 13 14 lt Grid gt 15 lt TextBlock Text Binding Title gt 16 lt Grid gt 17 lt UserControl gt a b 4 12 Transition 4 13 TransitionControl TransitionControl Transittion TransitionControl Content Content TransitionControl 4 21 TransitionControl MainView xaml gt mw lt YK Window x Class Section4_13 Views MainView xmlns http schemas mic
92. infx 2006 xaml 4 Title MainView Height 300 Width 300 gt 5 lt StackPanel gt 6 lt TextBox Text Binding Text UpdateSourceTrigger PropertyChanged gt 7 lt TextBlock Text Binding Result gt 8 lt Button Content Click me Command Binding ClearCommand gt 9 lt StackPanel gt 10 lt Window gt Text Button Command Button IsEnabled false TextBox Text Button Button IsEnabled true ClearCommand Text TextBox 1 Mainview MainView abcd BCD Click me a b
93. kit Controls MessageBoxResult string Ok or Cancel Yes No or Cancel a b MessageBox 4 9 MessageBox 4 10 SpinInput SpinInput SpinInput 4 17 Spininput MainView xaml co Nu Rw lt YK Window x Class Section4_10 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls Title MainView Height 300 Width 400 gt lt Grid gt lt Grid Resources gt lt Style TargetType tx Type TextBlock gt 40 75 YKToolkit Controls 4 Extended Controls lt Sette
94. lass MainView Model NotificationObject private DelegateCommand writeBitmapCommandi lt summary gt lt summary gt public DelegateCommand WriteBitmapCommand get return writeBitmapCommand writeBitmapCommand new DelegateCommand _ gt WriteBitmapCallback GetBitmapFileName private Func lt string gt writeBitmapCallbacki lt summary gt lt summary gt public Func lt string gt WriteBitmapCallback get return writeBitmapCallback set SetProperty ref writeBitmapCallback value YKToolkit Controls 5 lt summary gt lt summary gt lt returns gt lt returns gt private string GetBitmapFileName WriteBitmapCallback null return D test bmp Write Bitmap 5 7 SystemMenuBehavior D test bmp
95. lt YK Window x Class Section4_11 Views MainView 2 xmlns http schemas microsoft com winfx 2006 xaml presentation 3 xmlns x http schemas microsoft com winfx 2006 xaml 4 xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls 5 Title MainView Height 300 Width 300 gt 6 lt Grid VerticalAlignment Center gt 7 lt Grid RowDefinitions gt 8 lt RowDefinition Height Auto gt 9 lt RowDefinition Height 10 gt 10 lt RowDefinition Height Auto gt 11 lt RowDefinition Height 10 gt 12 lt RowDefinition Height Auto gt 13 lt Grid RowDefinitions gt 14 15 lt YK TextBox Watermark Input somthing gt 16 lt YK TextBox Grid Row 2 gt 17 lt YK TextBox Watermark gt 18 lt StackPanel Orientation Horizontal gt 19 lt Ellipse Fill Red Width 10 Height 10 Margin 4 0 gt 20 lt TextBlock Text gt 21 lt TextBlock Foreground gt 22 lt SolidColorBrush Color DynamicResource DisabledSymbolColor gt 23 lt TextBlock Foreground gt 24 lt TextBlock gt 25 lt StackPanel gt 26 lt YK TextBox Watermark gt 27 lt YK TextBOx gt 28 lt YK TextBox Grid Row 4 Watermark gt YKToolkit Controls 4 Extended Controls 29 lt YK TextBox WatermarkTemplate gt 30 lt DataTemplate gt 31 lt Border BorderBrush Green BorderThickness 1 gt 32 lt TextBlock Text Binding gt 33 lt Bo
96. n messade set SetProperty ref message value private DelegateCommand gotFocusCommandi lt summary gt lt summary gt public DelegateCommand GotFocusCommand get return gotFocusCommand gotFocusCommand new DelegateCommand _ gt Message count ToString0 59 75 5 YKToolkit Controls 5 4 RoutedEventTriggerBehavior 1 TextBox GotFocus Tab 1 TextBox GotFocusCommand 5 9 SystemMenuBehavior SystemMenuBehavior Alt F4 5 15 SystemMenuBehavior UESAC lt YK Window x Class Sectio
97. n5_9 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKb clr namespace YKToolkit Controls Behaviorsiassembly YKToolkit Controls Title MainView Height 100 Width 400 YKb SystemMenuBehavior lsSystemMenuEnabled True gt lt Grid gt lt TextBlock Text Alt Space gt lt Grid gt lt YKWindow gt mm oo 7 Alt Space 5 5 SystemMenuBehavior YKToolkit Controls Window System Windows Window SystemMenuBehavior IsSystemMenuEnabled false 5 10 TextBoxGotFocusBehavior TextBoxGotFocusBehavior TextBox
98. ndicator ri DropDownButton DirectorySelectDialog DropDownButton FileTreeView LineGraph M essageBox en TextBox Transiion View Type ViewModel
99. ng Param2 MinWidth 200 gt 66 lt StackPanel gt 67 lt StackPanel gt 68 lt YK DropDownButton gt 69 lt StackPanel gt 70 lt YK Window gt 4 10 DropDownButton ViewModel MainViewModel cs 1 namespace Section4_6 ViewModels 2 3 using YKToolkit Bindings 4 5 public class MainView Model NotificationObject 6 7 private string param1 Param1 8 lt summary gt 9 1 10 lt summary gt 11 public string Param1 12 13 get return paraml 14 set SetProperty ref param1 value 15 16 17 private string param2 Param2 18 lt summary gt 19 2 20 lt summary gt 21 public string Param2 22 23 get return param2 24 set SetProperty ref param2 value 25 26 27 DropDownButton ButtonContent Content DropDownButton
100. ng name 31 32 Item item 33 Name name 34 35 36 static ComboBoxLineGraphMoveOperationModes 37 38 Items new List lt ComboBoxLineGraphMoveOperationModes gt 39 40 new ComboBoxLineGraphMoveOperationModes OperationModes None None 41 new ComboBoxLineGraphMoveOperationModes OperationModes MoveX X Axis 42 new ComboBoxLineGraphMoveOperationModes OperationModes MoveY Y Axis 43 new ComboBoxLineGraphMoveOperationModes OperationModes MoveXY XY Axis 44 new ComboBoxLineGraphMoveOperationModes OperationModes MoveY2 Y2 Axis 45 new ComboBoxLineGraphMoveOperationModes OperationModes MoveXY2 XY2 Axis 46 47 48 49 rtems 6 3 ComboBoxLineGraphMoveOperationModes View ComboBox ItemsSource ComboBoxLineGraphMoveOperationModes Items 6 2 ComboBoxLineGraphMoveOperationModes
101. nuBehavior cecti TextBoxGotFocusBehavior ection5_10 Section5_11 WriteBitmapBehavior 65 75 6 ComboBox YKToolkit Controls 6 ComboBox YKToolkit Controls dll ComboBox YKToolkit 6 1 ComboBox 6 1 ComboBox ComnbeBpxBashetiles DashStyles ComboBox Se ComboBoxLineGraphLegendLocations EE CC 3 ComboBoxLineGraphMarkerTypes re on a an COmiebek OperationModes ComboBox OperationModes
102. ontrols Behaviorsiassembly YKToolkit Controls 6 Title MainView Height 300 Width 300 7 AllowDrop True 8 YKb FileDropBehavior Callback Binding FileDropCallback gt 9 lt Grid gt 10 lt TextBlock Text amp 11 TextWrapping Wrap gt 12 lt Grid gt 13 lt YK Window gt 5 9 FileDropBehavior MainViewModel cs 1 namespace Section5_6 ViewModels 2 3 using System 4 using YKToolkit Bindings 5 6 public class MainView Model NotificationObject 7 8 lt summary gt 9 10 lt summary gt 11 public Action lt string gt FileDropCallback 12 13 get return OnFileDrop 14 15 16 lt summary gt 17 18 lt summary gt 19 lt param name filenames gt lt param gt 20 private void OnFileDrop string filenames 21 22 foreach var filename in flenames 23 24 System Console WriteLine filename 25 26 27 28 FileDropBehavior Callback
103. osoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns YKb clr namespace YKToolkit Controls Behaviors assembly YKToolkit Controls Title MainView Height 200 Width 400 gt lt Grid gt lt StackPanel gt lt YK TextBox Watermark 58 1 YKToolkit Controls 5 YKb RoutedEventTriggerBehavior RoutedEvent GotFocus YKb RoutedEventTriggerBehavior Command Binding GotFocusCommand gt lt YK TextBox Watermark gt lt YK TextBox Watermark gt lt YK TextBox Watermark gt lt TextBlock Text Binding Message gt lt StackPanel gt lt Grid gt lt YK Window gt 5 14 RoutedEventTriggerBehavior ETN O00 Nnunk Rw namespace Section5_8 ViewModels using YKToolkit Bindings public class MainViewModel NotificationObject private int count private string messade lt summary gt lt summary gt public string Message get retur
104. ow 28 29 30 lt summary gt 31 32 lt summary gt 33 public void MinimizeMainView 34 5 5 YKToolkit Controls if mainView null _mainView WindowState WindowState Minimized lt summary gt lt summary gt public void MaximizeMainView if mainView null if mainView WindowState WindowState Normal _mainView WindowState WindowState Maximized else _mainView WindowState WindowState Normal IsEnabled ESC Shi t ESC 5 3 KeyDownBehavior 5 8 RoutedEventTriggerBehavior RoutedEventTriggerBehavior RoutedEvent 5 13 RoutedEventTriggerBehavior MainView xaml O00 Nn wh lt YK Window x Class Section5_8 Views MainView xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas micr
105. p lt summary gt lt param name sender gt lt param gt lt param name e gt lt Dparam gt private void RootNodeTextBox_Drop object sender System Windows DragEventArgs e var item e Data GetData typeof TreeViewltem as TreeViewltem if item null var data item Header as FileTreeNode if data null YKToolkit Controls FileTreeNode RootNodeTextBox Text data Nodelnfo FulIName lt summary gt PreviewDragOver lt summary gt lt param name sender gt lt param gt lt param name e gt lt Daram gt private void RootNodeTextBox_PreviewDragOver object sender System Windows DragEventArds e DragOver e Handled true YKToolkit Controls FileTreeNode System IO FileSystemlnfo NodeInfo Nodenfo Nodelnfo 4 8 LineGraph LineGraph
106. r Property VerticalAlignment Value Center gt lt Setter Property TextAlignment Value Right gt lt Style gt lt Style TargetType x Type YK SpinInput BasedOn StaticResource tx Type YK SpinInput gt lt Setter Property Margin Value 5 gt lt Style gt lt Grid Resources gt lt Grid RowDefinitions gt lt RowDefinition Height Auto gt lt RowDefinition Height Auto gt lt RowDefinition Height Auto gt lt RowDefinition Height Auto gt lt RowDefinition Height Auto gt lt Grid RowDefinitions gt lt Grid ColumnDefinitions gt lt ColumnDefinition Width Auto gt lt ColumnDefinition gt lt ColumnDefinition Width Auto gt lt ColumnDefinition gt lt Grid ColumnDefinitions gt lt TextBlock Grid Row 0 Grid Column 0 Text Min gt lt TextBlock Grid Row 1 Grid Column 0 Text Max gt lt TextBlock Grid Row 2 Grid Column 0 Text Decimal gt lt TextBlock Grid Row 0 Grid Column 2 Text Tick gt lt TextBlock Grid Row 1 Grid Column 2 Text Delay gt lt TextBlock Grid Row 2 Grid Column 2 Text Interval gt lt YK SpinInput Grid Row 0 Grid Column 1 x Name Min gt lt YK SpinInput Grid Row 1 Grid Column 1 x Name Max Value 100 gt lt YK SpinInput Grid Row 2 Grid Column 1 x Name Decimal Min 0 gt lt YK SpinInput Grid Row 0 Grid Column 3 x Name Tick Value 1 gt lt YK SpinInput Grid Row 1
107. rder gt 34 lt DataTemplate gt 35 lt YK TextBox WatermarkTemplate gt 36 lt YK TextBox gt 37 lt Grid gt 38 lt YK Window gt 4 11 TextBox 4 12 Transition Transitton TransitionControl Transition Source Source ITransitionListttem ITransitionListttem Name Type System Type 4 2 ITransitionListIttem
108. ridBehavior DisplayRowNumber 1 10 gt 11 lt Grid gt 12 lt YKWindow gt 5 4 DataGridBehavior 1 namespace Section5_3 Models 2 3 using YKToolkit Bindingsi 4 5 public class Person NotificationObject 6 private string name 8 lt summary gt 9 10 lt summary gt 11 public string Name 12 13 get return name 14 set SetProperty ref name value 15 16 17 private int age 18 lt summary gt ol 5 5 YKToolkit Controls 19 20 lt summary gt 21 public int Age 22 23 det return adei 24 set SetProperty ref age value 25 26 27 5 5 DataGridBehavior MainViewModel cs 1 namespace Section5_3 ViewModels 2 3 using Section5_3 Models 4 using System Collections ObjectModel using System Lindi 6 using YKToolkit Bindings 7 8 public class MainView Model NotificationObject 9 10 lt summary gt 11 12 lt summary gt 13 public MainViewModel 14 15 People new ObservableCollection lt Person gt Enumerable Range 0 100 Select i gt new Person 16 17 Name
109. rosoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns YK clr namespace YKToolkit Controlsi assembly YKToolkit Controls xmlns vw clr namespace Section4_13 Views xmlns vm clr namespace Section4_13 ViewModels Title MainView Height 300 Width 300 gt 45 75 4 Extended Controls YKToolkit Controls lt Grid gt lt Grid RowDefinitions gt lt RowDefinition Height 24 gt lt RowDefinition gt lt Grid RowDefinitions gt lt ComboBox x Name ScreenSelector SelectedIndex 0 gt lt ComboBox ItemsSource gt lt x Array Type x Type UserControl gt lt VW Page1View gt lt vw Page1View DataContext gt lt vm Page1ViewModel gt lt vw Page1View DataContext gt lt vw Page1View gt lt vw Page2View gt lt vw Page2View DataContext gt lt vm Page2ViewModel gt lt vw Page2View DataContext gt lt vw Page2View gt lt vw Page3View gt lt vw Page3View DataContext gt lt vm Page3ViewModel gt lt vw Page3View DataContext gt lt vw Page3View gt lt x Array gt lt ComboBox ItemsSource gt lt ComboBox ItemTemplate gt lt DataTemplate gt lt TextBlock Text Binding Name gt lt DataTemplate gt lt ComboBox ItemTemplate gt lt ComboBox gt lt Border Grid Row 1 gt lt YK TransitionControl Content Binding Selectedltem ElementName ScreenSelectorJ gt lt Border gt lt Grid gt
110. ry gt 3 lt summary gt public IEnumerable lt Point gt Data3 get return data3 set SetProperty ref data3 value private DelegateCommand updateCommandi lt summary gt lt summary gt public DelegateCommand UpdateCommand get return updateCommand updateCommand new DelegateCommand _ gt UpdateGraphData lt summary gt lt summary gt private void UpdateGraphData var rnd new Random var N 1001 3 79 4 Extended Controls YKToolkit Controls 71 var fMax 15 0 72 double fi 73 74 f rnd NextDouble fMax 75 Data1 Enumerable Range 0 N Select i gt 76 77 fHz 78 var x double i 79 vary 10 0 Math Sin 2 0 Math PI f x 1000 0 80 return new Point x y 81 82 83 f rnd NextDouble fMax 84 Data2 Enumerable Range 0 N Select i gt 85 86 fIHz r 4 87 var x double i 88 vary 10 0 Math Sin 2 0 Math PI f x 1000 0 Math PI 4 0 89 return new Point x y 30 91 92 f rnd NextDouble fMax 93 double d 0 0 94 Data3 Enumerable Range 0 N Select i gt 95 96
111. t Donrtt touch me 12 lsEnabled False 13 IsChecked Binding IsChecked ElementName checkbox1 Converter StaticResource InverseBooleanConverter gt 14 lt StackPanel gt 15 lt YK Window gt 70 75 YKToolkit Controls 7 Converter Y Check me 7 1 InverseBooleanConverter true false 7 Section7 Section7_2 InverseBooleanConverter 2 7 8 YKToolkit Controls 8 8 1 View Binding vairablename YKToolkit Controls dll 8 1 ComparisonBinding DataTrigger
112. t Controls 4 Extended Controls IsFileEnabled Root Directory C File Extension Filter A C Attributes Attributes CreationTime CreationTime CreationTimeUtc CreationTimeUtc Exists Exists Extension Extension FulIName FulIName LastAccessTime LastAooesSTime LastAccessTimeUtc LastAccessTimeUtc LastWriteTime LastWriteTime LastWriteTimeUtc W LastWriteTimeUtc Name Name 4 6 FileTreeview 4 11 FileTreeVview MainView xaml 49 lt YK FileTreeView Grid Row 1 50 x Name FileTreeView 51 Margin 20 10 20 10 52 IsFileEnabled Binding IsChecked ElementName tIsFileEnabledCheckBoxj 53 RootNode Binding Text ElementName RootNodeTextBox 54 ExtensionFilter Binding Text ElementName ExtensionFilterTextBoxj 55 gt FileTreeVview risFileEnabled RootNode ExtensionFilter IsFileEnabled FileTreeview RootNode FileTreeview
113. ts Binding Data3 IsSecond True StrokeThickness 3 gt 32 lt x Array gt 33 lt YK LineGraph ItemsSource gt 34 lt YK LineGraph gt 35 lt Grid gt 36 lt YK Window gt 4 14 LineGraph ViewModel ET eT namespace Section4_8 ViewModels using System using System Collections Generic using System Lindi using System Windows using YKToolkit Bindings public class MainViewModel NotificationObject lt summary gt DD oN 30 78 YKToolkit Controls 4 Extended Controls lt summary gt public MainViewModel UpdateGraphData private IEnumerable lt Point gt data1 lt summary gt 1 lt summary gt public IEnumerable lt Point gt Data1 get return data1 set SetProperty ref data1 value private IEnumerable lt Point gt data2 lt Summary gt 2 lt summary gt public IEnumerable lt Point gt Data2 get return data2 set SetProperty ref data2 value private IEnumerable lt Point gt data3 lt summa
114. ult YKToolkit Controls 3 YKToolkit Controls dll 30 set SetProperty ref result value 33 SetProperty NotificationObject private true false 3 3 DelegateCommand Command ICommand YKToolkit Controls dll ICommand
115. w DelegateCommand gt App Instance MinimizeMainView _ gt IsEnabled xmlns YKb clr namespace YKToolkit Controls Behaviorsiassembly YKToolkit Controls YKToolkit Controls 5 32 34 private DelegateCommand maximizeCommandi 35 lt summary gt 36 37 lt summary gt 38 public DelegateCommand MaximizeCommand 39 40 get 41 42 return maximizeCommand maximizeCommand new DelegateCommand 43 gt 44 45 App nstance MaximizeMainView 46 47 _ gt IsEnabled 5 12 KeyDownBehavior App xaml cs namespace Section5_7 2 3 using Section5_7 View Models 4 using Section5_7 Viewsi 5 using System Windows 6 7 lt summary gt 8 App xaml 9 lt summary gt 10 public partial class App Application 11 12 lt summary gt 13 WPF Application 14 lt summary gt 15 public static App Instance get return Application Current as App 16 17 private MainView _mainViewi 18 19 protected override void OnStartup StartupEventArds e 20 21 base OnStartup e 22 23 var vm new MainViewModel0 24 25 _mainView new MainView 26 _mainView DataContext vVm 27 _mainView Sh
Download Pdf Manuals
Related Search
Related Contents
Discharge HT - Grainger.com Copyright © All rights reserved.
Failed to retrieve file