Example #1
0
        private void CCTVList_Loaded(object sender, RoutedEventArgs e)
        {
            var CCTVItem  = CCTVListView.ContainerFromItem(CCTVSelectedItem) as ListViewItem;
            var ChildGrid = UIElementUtil.FindChild <Grid>(CCTVItem, "ChildGrid");

            if (ChildGrid != null)
            {
                ChildGrid.BorderBrush = ConverHexToColor.GetSolidColorBrush("#ffcb00");
            }
        }
        private void LocalNotice()
        {
            string NoticeText = "Saved.";

            manager.Show(new SimpleNotificationPresenter
                         (
                             TimeSpan.FromSeconds(2),
                             text: NoticeText,
                             action: async() => await new MessageDialog(NoticeText).ShowAsync(),
                             glyph: "\uE001"
                         )
            {
                Background = ConverHexToColor.GetSolidColorBrush("#ffcb00"),
                Foreground = new SolidColorBrush(Windows.UI.Colors.White),
            },
                         (LocalNotificationCollisionBehaviour)1);
        }
        private void SettingPlugListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            Debug.WriteLine("SettingPlugListView_ItemClick!!");

            foreach (TextBlock tb in UIElementUtil.FindChildArray <TextBlock>(SettingDeviceListView, "CircleIcon"))
            {
                tb.Foreground = new SolidColorBrush(Windows.UI.Colors.DimGray);
            }

            ListView SettingPlugListView = sender as ListView;
            var      item     = e.ClickedItem;
            var      PlugItem = SettingPlugListView.ContainerFromItem(item) as ListViewItem;

            foreach (TextBlock tb in UIElementUtil.FindChildArray <TextBlock>(PlugItem, "CircleIcon"))
            {
                tb.Foreground = ConverHexToColor.GetSolidColorBrush("#ffcb00");
            }
        }
        private void CustomName_GotFocus(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("CustomName_GotFocus!!");
            foreach (TextBlock tb in UIElementUtil.FindChildArray <TextBlock>(SettingDeviceListView, "CircleIcon"))
            {
                tb.Foreground = new SolidColorBrush(Windows.UI.Colors.DimGray);
            }

            TextBox        textBox             = sender as TextBox;
            ZigBeeEndPoint endpoint            = textBox.DataContext as ZigBeeEndPoint;
            ListView       SettingPlugListView = UIElementUtil.FindParent <ListView>((TextBox)sender);

            var PlugItem = (ListViewItem)SettingPlugListView.ContainerFromItem(endpoint);

            foreach (TextBlock tb in UIElementUtil.FindChildArray <TextBlock>(PlugItem, "CircleIcon"))
            {
                tb.Foreground = ConverHexToColor.GetSolidColorBrush("#ffcb00");
            }
        }
Example #5
0
        private async void HighLightSelectedItem(object Item)
        {
            if (Item == null)
            {
                return;
            }

            await Task.Delay(100);

            foreach (Grid gd in UIElementUtil.FindChildArray <Grid>(CCTVListView, "ChildGrid"))
            {
                gd.BorderBrush = new SolidColorBrush(Windows.UI.Colors.Transparent);
            }

            var CCTVItem  = CCTVListView.ContainerFromItem(Item) as ListViewItem;
            var ChildGrid = UIElementUtil.FindChild <Grid>(CCTVItem, "ChildGrid");

            if (ChildGrid != null)
            {
                ChildGrid.BorderBrush = ConverHexToColor.GetSolidColorBrush("#ffcb00");
            }
        }
Example #6
0
        private void PlugDeivceListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Debug.WriteLine("PlugDeivceListView_SelectionChanged");
            foreach (var item in e.RemovedItems)
            {
                var LightDeivceItem = PlugDeivceListView.ContainerFromItem(item) as ListViewItem;
                var ChildGrid       = UIElementUtil.FindChild <Grid>(LightDeivceItem, "ChildGrid");
                if (ChildGrid != null)
                {
                    ChildGrid.BorderBrush = new SolidColorBrush(Windows.UI.Colors.Transparent);
                }
            }

            foreach (var item in e.AddedItems)
            {
                var LightDeivceItem = PlugDeivceListView.ContainerFromItem(item) as ListViewItem;
                var ChildGrid       = UIElementUtil.FindChild <Grid>(LightDeivceItem, "ChildGrid");
                if (ChildGrid != null)
                {
                    ChildGrid.BorderBrush = ConverHexToColor.GetSolidColorBrush("#ffcb00");
                }
            }
        }