Skip to content

Instantly share code, notes, and snippets.

@tmyt
Last active August 29, 2015 14:02
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 tmyt/f99cc0b1e227df595161 to your computer and use it in GitHub Desktop.
Save tmyt/f99cc0b1e227df595161 to your computer and use it in GitHub Desktop.
いまにゅーにお昼きかれたやつ、こうすればいいんじゃないん、って思ったやつ(その2)
<StackPanel>
<local:MyControl Button.Click="ButtonClick" />
<Grid x:Name="HogeGrid" Visibility="Collapsed" />
</StackPanel>
public class MainPage : Page
{
public MainPage()
{
InitializeComponents();
}
public void ButtonClick(object sender, RoutedEventArgs args)
{
HogeGrid.Visibility = Visibility.Visible;
}
}
<Button x:Name="Button 1" Content="Button 1" Click="ButtonClick" />
<Button x:Name="Button 2" Content="Button 2" />
public class MyControl : UserControl
{
public MyControl()
{
InitializeComponents();
}
public void ButtonClick(object sender, RoutedEventArgs args)
{
args.Handled = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment