C#WP8开发中网格视图上的可视/折叠按钮
伙计们,我是windows phone 8开发的新手。 我无法控制网格视图的可见性和位于该网格上的按钮的可见性。。 这是我的xaml视图快照 这是我的Xaml视图…我在左侧有一个网格视图和按钮。(1,2,3,4,5)…这些按钮的可视性被折叠…当点击交易按钮时,我希望所有按钮都可见..但是我的屏幕上显示了2,3个错误 这是我的xaml.cs代码C#WP8开发中网格视图上的可视/折叠按钮,c#,xaml,windows-phone-8,C#,Xaml,Windows Phone 8,伙计们,我是windows phone 8开发的新手。 我无法控制网格视图的可见性和位于该网格上的按钮的可见性。。 这是我的xaml视图快照 这是我的Xaml视图…我在左侧有一个网格视图和按钮。(1,2,3,4,5)…这些按钮的可视性被折叠…当点击交易按钮时,我希望所有按钮都可见..但是我的屏幕上显示了2,3个错误 这是我的xaml.cs代码 public main() { InitializeComponent(); } private void
public main()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));
}
private void Grid_View_Btn_1_Click(object sender, System.Windows.RoutedEventArgs e)
{
// a.Visible = !a.Visible;
a.Visibility = Visibility.Visible; //Also possible to Collapse (hide).
b.Visibility = Visibility.Visible; //Also possible to Collapse (hide).
c.Visibility = Visibility.Visible; //Also possible to Collapse (hide).
d.Visibility = Visibility.Visible; //Also possible to Collapse (hide).
e.Visibility = Visibility.Visible; //Also possible to Collapse (hide).
// TODO: Add event handler implementation here.
}
这是我的xaml代码
<Grid x:Name="grid" Height="618" Margin="6,147,0,0" Width="112" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel.png"/>
</Grid.Background>
<Button x:Name="a" Content="1" HorizontalAlignment="Left" Margin="-7,-11,-11,563" VerticalAlignment="Bottom" Width="130" RenderTransformOrigin="0.636,0.638" Height="66" BorderThickness="0" d:IsHidden="True">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel_btn_unselected.png"/>
</Button.Background>
</Button>
<Button x:Name="b" Content="2" HorizontalAlignment="Left" Margin="-7,0,-11,519" VerticalAlignment="Bottom" Width="130" RenderTransformOrigin="0.636,0.638" Height="66" BorderThickness="0" d:IsHidden="True">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel_btn_unselected.png"/>
</Button.Background>
</Button>
<Button x:Name="c" Content="3" HorizontalAlignment="Left" Margin="-7,0,-11,475" VerticalAlignment="Bottom" Width="130" RenderTransformOrigin="0.636,0.638" Height="66" BorderThickness="0" d:IsHidden="True">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel_btn_unselected.png"/>
</Button.Background>
</Button>
<Button x:Name="d" Content="4" HorizontalAlignment="Left" Margin="-7,0,-11,431" VerticalAlignment="Bottom" Width="130" RenderTransformOrigin="0.636,0.638" Height="66" BorderThickness="0" d:IsHidden="True">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel_btn_unselected.png"/>
</Button.Background>
</Button>
<Button x:Name="e" Content="5" HorizontalAlignment="Left" Margin="-7,0,-11,387" VerticalAlignment="Bottom" Width="130" RenderTransformOrigin="0.636,0.638" Height="66" BorderThickness="0" d:IsHidden="True">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="pannel_btn_unselected.png"/>
</Button.Background>
</Button>
</Grid>
出现的错误是“错误:'System.Windows.RoutedEventArgs'不包含“可见性”的定义,并且找不到接受“System.Windows.RoutedEventArgs”类型的第一个参数的扩展方法“可见性”(是否缺少using指令或程序集引用?)
请帮我解决我的问题。。。
我只想在点击交易按钮后看到那个按钮 事件处理程序网格视图\u Btn\u 1\u单击有一个参数“e”。当引用“e”时,处理程序将使用参数“e”,而不是控件“e”。将handlers参数重命名为“e2”或类似名称。事件处理程序网格视图\u Btn\u 1\u单击有一个参数“e”。当引用“e”时,处理程序将使用参数“e”,而不是控件“e”。将handlers参数重命名为“e2”或类似名称。事件处理程序网格视图\u Btn\u 1\u单击有一个参数“e”。当引用“e”时,处理程序将使用参数“e”,而不是控件“e”。将handlers参数重命名为“e2”或类似名称。事件处理程序网格视图\u Btn\u 1\u单击有一个参数“e”。当引用“e”时,处理程序将使用参数“e”,而不是控件“e”。将handlers参数重命名为“e2”或类似名称。或者更好,将按钮称为a-eOr以外的名称更好,将按钮称为a-eOr以外的名称更好,将按钮称为a-eOr以外的名称更好,将按钮称为a-e以外的名称更好