Skip to content

Instantly share code, notes, and snippets.

@nuitsjp
Created July 9, 2016 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuitsjp/10ebc5aa00f8dfcd0b7e399fc64a2bc6 to your computer and use it in GitHub Desktop.
Save nuitsjp/10ebc5aa00f8dfcd0b7e399fc64a2bc6 to your computer and use it in GitHub Desktop.
WPFやXamarinのICommandを改めて整理する XAML
<Window x:Class="CommandSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CommandSample"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<StackPanel Orientation="Vertical">
<Label Content="氏名"/>
<TextBox Text="{Binding Name}"/>
<Label Content="住所"/>
<TextBox/>
<Button Content="実行" Command="{Binding ExecuteCommand}"/>
<Label Content="{Binding Result}"/>
</StackPanel>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment