WPF
DockPanelã¯ãåè¦ç´ ãä¸ãã並ã¹ãã¨ããä¸ãã並ã¹ãã¨ããå·¦ãã並ã¹ãã¨ããå³ãã並ã¹ãã¨ããããããæ示ãã§ãããDockPanel ã¯ã©ã¹ (System.Windows.Controls) | Microsoft Learn WPF4.5å ¥é ãã®15 ãã¬ã¤ã¢ã¦ãã³ã³ããã¼ã«ã®DockPanelã¨WrapPaneâ¦
Canvasã«ButtonãTextBoxãªã©ã®ã³ã³ããã¼ã«ãé ç½®ããæãæ·»ä»ããããã£ã®Canvas.Leftã使ã£ã¦ä½ç½®ãæå®ããã¨ãCanvasã®å·¦ç«¯ããã®ç¸å¯¾ä½ç½®ã§é ç½®ããããCanvas.Left Attached Property (System.Windows.Controls) | Microsoft Docs Button1ã¯Canvas.Leâ¦
Canvasã®ä¸ã«ã座æ¨ãæå®ãã¦ã³ã³ããã¼ã«ãé ç½®ãããCanvas Class (System.Windows.Controls) | Microsoft Docs WPF4.5å ¥é ãã®14 ãã¬ã¤ã¢ã¦ãã³ã³ããã¼ã«ã®Canvasã¨StackPanelã - ãããã®Blog@hatena座æ¨ãæå®Canvasã®ä¸ã«Buttonãé ç½®ãã¦ãButtoâ¦
Control.Foregroundããããã£ã§ãã³ã³ããã¼ã«ã®åæ¯ãã©ã·ãè¨å®ã»åå¾ã§ãããControl.Foreground Property (System.Windows.Controls) | Microsoft DocsBackgroundãRedã®ç¶æ Backgroundã"Red"ã®ç¶æ ã¯ããã ããForegroundã«"White"ãã»ããããã¨ãåâ¦
Control.Backgroundããããã£ã§ãã³ã³ããã¼ã«ã®èæ¯ãã©ã·ãè¨å®ã»åå¾ã§ãããControl.Background Property (System.Windows.Controls) | Microsoft Docsãã¿ã³ã®ããã©ã«ãç¶æ ãã¿ã³ã®èæ¯è²ã¯ãããã©ã«ãã§ã¯ãã®ãããªç¶æ ã«ãªã£ã¦ããããBackgrounâ¦
Borderã¯ãåè¦ç´ ã®å¨å²ã罫ç·ã§å²ããBorder Class (System.Windows.Controls) | Microsoft Docs WPF4.5å ¥é ãã®13 ãç°¡åãªã¬ã¤ã¢ã¦ããè¡ãã³ã³ããã¼ã«ã - ãããã®Blog@hatenaButtonã®å¨å²ã«ç½«ç·å¤ªã5ããã©ã·ã®è²ã¯é»ã§ãå²ããå²ãããä½ç½ãåºæ¥ã¦â¦
Viewboxã¯ãåã³ã³ããã¼ã«ãæ¡å¤§ç¸®å°ãã¦è¡¨ç¤ºã§ãããViewbox Class (System.Windows.Controls) | Microsoft Docs WPF4.5å ¥é ãã®16 ãViewBoxã³ã³ããã¼ã«ã - ãããã®Blog@hatenaViewboxã¨è¡¨ç¤ºããButtonã®ãµã¤ãºViewboxã¨è¡¨ç¤ºããButtonã®ãµã¤ãºã決ãâ¦
ListBoxItemã¯ãListBoxå ã®é¸æå¯è½ãªé ç®ãListBoxItem Class (System.Windows.Controls) | Microsoft DocsListBoxItemã追å ãã¦ãããã®ããã«ListBoxã®ä¸ã«ListBoxItemã追å ãã¦ãããListBoxItemã®ä¸ã«è¡¨ç¤ºããããã¹ããæ¸ãããããªé¢¨ã«ãããªé¢¨ã«â¦
ListBoxã¯ãé¸æå¯è½ãªé ç®ãæã¤ãªã¹ãããã¯ã¹ã表示ãããListBox Class (System.Windows.Controls) | Microsoft DocsButtonã«æã¾ãããããªå½¢ã§ListBoxãé ç½®Buttonã«æã¾ãããããªå½¢ã§ListBoxãé ç½®ã表示ã ãä½ãé ç®ããªãã®ã§é¸æãã§ããªããSampâ¦
Labelã³ã³ããã¼ã«ã¯ç·¨éä¸å¯è½ãªããã¹ãã®è¡¨ç¤ºã«ä½¿ããLabel Class (System.Windows.Controls) | Microsoft DocsTextBlockã¨ã®éãã¯ãContentControlã®æ´¾çã¯ã©ã¹ã§ããã¨ãããã¨ãTextBlockã¯Textã§Labelã¯ContentTextBlockã¯Textã§ãLabelã¯ContentãLâ¦
Imageã³ã³ããã¼ã«ã§ç»åã表示ãããImage Class (System.Windows.Controls) | Microsoft DocsStackPanelã®ä¸ã«Imageã¿ã°ãé ç½®StackPanelã®ä¸ã«Imageã¿ã°ãé ç½®ããããªæããããªæãããã©ã«ãã追å ãã©ã«ãã追å ããããªé¢¨ã«ãããªé¢¨ã«ãæ¢åã®é ç®ãâ¦
Buttonã®ãããªã³ã³ãã³ããæå®ã§ããã¿ã°ã¯ã©ããã£ã¦ã§ããã®ãã ã¾ããã³ã¬ã¯ã·ã§ã³ã«é¢ããXAMLã®æ¸ãæ¹ã«ã¤ãã¦ãæ±ããXAMLå´XAMLå´ãããæ¸ããã ãã§ã¯ãTestClassããªãã®ã§å½ç¶ãããªãã TestClass.csã«ã // åå空é namespace BGST { // ãâ¦
WrapPanel.Orientationã§ã並ã¹ãæ¹åãæå®ã§ããWrapPanel.Orientation Property (System.Windows.Controls) | Microsoft DocsVerticalã§ç¸¦æ¹åã«ãªãOrientationãVerticalã«ããã¨ç¸¦æ¹åã«ãªããæåã¯ç¸¦ä¸åæåã¯ç¸¦ä¸åã縦ãçããã¨æ¨ªã«åºãã縦ãçâ¦
WrapPanelããStackPanelã®ããã«ç¸¦æ¹åã横æ¹åã«ä¸¦ã¹ãããã«ã¬ã¤ã¢ã¦ãã ãã ããåã³ã³ããã¼ã«ãã¯ã¿åºãªãããã«æãè¿ãæ©è½ããããWrapPanel Class (System.Windows.Controls) | Microsoft Docsããã©ã«ãã¯æ¨ªæ¹åããã©ã«ãã¯æ¨ªæ¹åã ãããµã¤ãºâ¦
FrameworkElement.Heightã§é«ããæå®ã§ãããFrameworkElement.Height Property (System.Windows) | Microsoft Docs1ã¤ç®ã®é«ãã20ã«ãã1ã¤ç®ã®é«ãã20ã«ããã2ã¤ç®ã¯30, 3ã¤ç®ã¯50ã«ãã2ã¤ç®ã¯30ã3ã¤ç®ã¯50ã«ããããã®ããã«é«ãããã©ãã©ã«ãªããâ¦
FrameworkElement.Widthã§ãå¹ ãæå®ã§ãããFrameworkElement.Width Property (System.Windows) | Microsoft Docs1ã¤ç®ã®Buttonã®Widthã50ã«ãã1ã¤ç®ã®Buttonã®Widthã50ã«ããã2ã¤ç®ã¯100, 3ã¤ç®ã¯150ã¨ãã2ã¤ç®ã¯100ã3ã¤ç®ã¯150ã¨ãããå¹ ã®éããã¿â¦
StackPanel.Orientationã§ç¸¦æ¹åã横æ¹åã並ã¹ãæ¹åãæå®ã§ãããStackPanel.Orientation Property (System.Windows.Controls) | Microsoft Docsããã©ã«ãã¯ç¸¦æ¹åããã©ã«ãã¯ç¸¦æ¹åã«ãªã£ã¦ããããHorizontalOrientationãHorizontalã«ããã¨æ¨ªæ¹åã«â¦
ContentControl.Contentã§ãButtonãªã©ã³ã³ãã³ã(æååãç»åãªã©)ãä¸ã«è¡¨ç¤ºãããããªã³ã³ããã¼ã«ã®ã³ã³ãã³ããã»ãããããContentControl.Content Property (System.Windows.Controls) | Microsoft Docsæååã®ã³ã³ãã³ãã®å ´åã¯ãã»ããããã«ã¯3â¦
StackPanelã¯ã縦æ¹åãã¾ãã¯æ¨ªæ¹åã«åã³ã³ããã¼ã«ã並ã¹ãããã«ã¬ã¤ã¢ã¦ããStackPanel Class (System.Windows.Controls) | Microsoft DocsStackPanelGridããã£ããå¤ãã¦ãStackPanelãWindowç´ä¸ã«ãããButtonãé ç½®åè¦ç´ ã«Buttonãé ç½®ã3ã¤ä¸¦ã¹â¦
ãã¡ããApplication.StartupUriã§ãã¡ã¤ã³ã¦ã£ã³ãã¦ãæå®ã§ãããApplication.StartupUri Property (System.Windows) | Microsoft Docsãã¡ãã¯ã¡ã¤ã³ã¦ã£ã³ãã¦ãªãã¸ã§ã¯ãã§ã¯ãªãxamlãã¡ã¤ã«ãæå®ããã¨ããæããæ°ããé ç®æ°ããé ç®ãStartWindoâ¦
Application.StartupUriã§ã¯ãªãã¦ãApplication.MainWindowã§ã¡ã¤ã³ã¦ã£ã³ãã¦ãæå®ãããã¨ãã§ãããApplication.MainWindow Property (System.Windows) | Microsoft DocsStartupUriãå¤ãStartupUriãå¤ãã¦ããã«ãã¯éãããã¦ã£ã³ãã¦ã表示ãããªãâ¦
x:Classã§ãã¿ã°åã®ã¯ã©ã¹ãåºåºã¯ã©ã¹ã¨ãã¦ãå ·ä½çãªæ´¾çã¯ã©ã¹åãæå®ã§ãããx:Class ãã£ã¬ã¯ãã£ã | Microsoft Docsæ°ããé ç®æ°ããé ç®ã§ãWindow2.xamlæ¢å®ã®ããã¸ã§ã¯ãã«Window2.xamlã追å ãx:Classx:Classã«xmlns_x.Window2ãæå®ãApp.xaâ¦
assemblyã«ã¯ã©ã¹ã©ã¤ãã©ãªãæå®ãããã¨ã§ããã®ã¯ã©ã¹ã©ã¤ãã©ãªã®ã¯ã©ã¹ãXAMLã§ã¿ã°ã¨ãã¦ä½¿ãããWPF XAMLã§å¥ã¢ã»ã³ããªã®CLRåå空éã宣è¨ããã - QiitaWPFããã¸ã§ã¯ãWPFããã¸ã§ã¯ããDLLåããTestClassã©ã¤ãã©ãªãç½®ãããã¾ã§æ±ã£ã¦ããTeâ¦
x:Nameã§ããã®ã¿ã°ã®ãªãã¸ã§ã¯ãåãæå®ã§ãããx:Name ãã£ã¬ã¯ãã£ã | Microsoft Docsããã¾ã§ã使ã£ã¦ããTestClassã¿ã°ã§ãx:Namex:Nameãé¸æããtest1test1ãæå®ãWindow1.xaml.cså´ããã使ããWindow1.xaml.cså´ãããtest1ã使ããããã®ããâ¦
clr-namespaceã§ãåå空éãæå®ããã¨ããã®åå空éã®ã¯ã©ã¹ãXAMLã§ä½¿ãããXAML åå空éããã³ WPF XAML ã®åå空éã®å²ãå½ã¦ | Microsoft DocsWPFããã¸ã§ã¯ãWPFããã¸ã§ã¯ããæ°ããé ç®æ°ããé ç®ãTestClass.csTestClass.cs追å å¾è¿½å ããããã¨â¦
xmlns:xã¯ãXAMLè¨èªã®æ©è½ã表ããã¼ã¯ã¼ãã§æå®ããåå空éãXAML åå空éããã³ WPF XAML ã®åå空éã®å²ãå½ã¦ | Microsoft Docs XAMLã®åºç¤ï¼1/2ï¼ - ï¼ ITWPFããã¸ã§ã¯ãWPFããã¸ã§ã¯ããæåãã®ç¶æ æåãã®ç¶æ ã ä»®ã«"xmlns:x"ã®è¡ãåé¤ããâ¦
XAMLã«ããããã¼ã¯ã¼ãã«ã¤ãã¦æ±ã£ã¦ãããXAML åå空éããã³ WPF XAML ã®åå空éã®å²ãå½ã¦ | Microsoft Docs XAMLã®åºç¤ï¼1/2ï¼ - ï¼ ITxmlnsã¯ãXAMLã«éãããXMLã«ããã¦ã¯ããã©ã«ãã®åå空éãæããXMLåå空éã®ç°¡åãªèª¬æWPFã¢ããªã±ã¼ã·ã§ã³â¦
WPFã®InitializeComponentã®æ£ä½ã¯ãIComponentConnector.InitializeComponentã®æ¨¡æ§ãIComponentConnector.InitializeComponent Method (System.Windows.Markup) | Microsoft Docsã¡ããã¨ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãã¦å®ç¾©ããã¦ããWPFã¢ããªã±ã¼ã·ã§ã³WPFã¢ãâ¦
Window.ContentRenderedã¯ãã¦ã£ã³ãã¦ã®XAMLã³ã³ãã³ããã¬ã³ããªã³ã°å®äºããå¾ã«çºçããã¤ãã³ããWindow.ContentRendered Event (System.Windows) | Microsoft Docs WPF Windowãæåã«è¡¨ç¤ºãããã¨ãã«å¦çãè¡ããã - Qiitaã¦ã£ã³ãã¦ã®æç»å¾ã«å¦çâ¦
Window.Activatedã¯ãã¦ã£ã³ãã¦ãã¢ã¯ãã£ãã®æã«çºçããã¤ãã³ããWindow.Activated Event (System.Windows) | Microsoft DocsWPFã¢ããªã±ã¼ã·ã§ã³WPFã¢ããªã±ã¼ã·ã§ã³ã§ãLabelãé ç½®Labelãé ç½®ãWindowã«ActivatedWindowã«Activatedãã¤ãã³ããã³ãâ¦