Created
June 21, 2014 09:56
-
-
Save tmyt/afb326b0135ba8c08b64 to your computer and use it in GitHub Desktop.
いまにゅーにお昼きかれたやつ、こうすればいいんじゃないん、って思ったやつ(その1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackPanel> | |
<local:myControl MyButtonClick="MyButtonClick" /> | |
<Grid x:Name="HogeGrid" Visibility="Collapsed" /> | |
</StackPanel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainPage : Page | |
{ | |
public MainPage() | |
{ | |
InitializeComponents(); | |
} | |
public void MyButtonClick(object sender) | |
{ | |
HogeGrid.Visibility = Visibility.Visible; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button Content="ぼたん" Click="ButtonClick" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class myControl : UserControl | |
{ | |
public event EventHandler MyButtonClick; | |
public myControl(){ | |
InitializeComponents(); | |
} | |
public void ButtonClick(object sender, RoutedEventArgs args) | |
{ | |
var h = MyButtonClick; | |
if(h!=null) h(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment