Example #1
0
        private void InitTitle()
        {
            string resKey = $"ExtensionsPanel{TargetDeviceState.ToString()}";

            if (TryFindResource(resKey) != null)
            {
                TBTitle.SetResourceReference(TextBlock.TextProperty, resKey);
            }
            else
            {
                TBTitle.SetResourceReference(TextBlock.TextProperty, "ExtensionsPanelNoMatter");
            }
        }
Example #2
0
        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            string resKey = $"PanelExtensionsWhenCurrentDevice{TargetDeviceState.ToString()}";

            if (TryFindResource(resKey) != null)
            {
                TBTitle.SetResourceReference(TextBlock.TextProperty, resKey);
            }
            else
            {
                TBTitle.SetResourceReference(TextBlock.TextProperty, "PanelExtensionsWhenCurrentDeviceNoMatter");
            }
            (DataContext as VMExtensions)?.Load(TargetDeviceState);
        }