uwp C#中其他页面的图像突出显示信息

我想从一个窗口发送到另一个窗口,选择此网格,并在另一窗口上突出显示该网格。我的代码遍历图像并停在一个位置,然后“突出显示”,但是我也希望在另一页Datapage上也突出显示该代码。 DatapageFilepage具有相同的图像。

public void Timer_Tick(object sender,object e)
{
    index++;
    for (int i = 1; i <= 12; i++)
    {
        ((Grid)gMainGrid.findname($"g" + i)).BorderBrush = new SolidColorBrush(Colors.Black);
    }
    ((Grid)gMainGrid.findname($"g{index}")).BorderBrush = new SolidColorBrush(Colors.White);
    if (index == random)
    {
        Timer.Stop();
        SpinnerSecond.Visibility = Visibility.Collapsed;

        DataWatch.valueWatch = random;
        RollKnop.Visibility = Visibility.Visible;
    }
}

这就是我想要的,但是只要单击一下按钮,我就可以实时更新?

private void ButtonClick(object sender,RoutedEventArgs e)
{
   ((Grid)gMainGrid2.findname($"g{ DataWatch.valueWatch}")).Background = new SolidColorBrush(Colors.LightGoldenrodYellow);
}
wxp1818118 回答:uwp C#中其他页面的图像突出显示信息

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3111686.html

大家都在问