/// <summary> /// 动态显示内容 /// </summary> /// <param name="target"></param> /// <param name="duration"></param> public static void Show(ContentControl target, double duration = .8) { ThicknessAnimation animtion = new ThicknessAnimation() { From = new Thickness(target.Margin.Left + 80, target.Margin.Top, target.Margin.Right, target.Margin.Bottom), To = new Thickness(160, 0, 0, 0), Duration = TimeSpan.FromSeconds(duration), FillBehavior = FillBehavior.HoldEnd, AccelerationRatio = .5, EasingFunction = be }; DoubleAnimation animtion2 = new DoubleAnimation() { From = 0, To = 1, Duration = TimeSpan.FromSeconds(duration), FillBehavior = FillBehavior.HoldEnd, AccelerationRatio = .5, EasingFunction = be }; target.BeginAnimation(ContentControl.MarginProperty, animtion); target.BeginAnimation(ContentControl.OpacityProperty, animtion2); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); _pageContent = GetTemplateChild(ElementPageContent) as ContentControl; if (_pageContent == null) throw new MissingMemberException("Expected to find template member: " + ElementPageContent); _menuContent = GetTemplateChild(MenuContent) as Panel; if (_menuContent == null) throw new MissingMemberException("Expected to find template member: " + MenuContent); AddChildren(); // select the first child if (Children.Count > 0) { NavigationButton button = Children[0] as NavigationButton; if (button != null) { button.IsSelected = true; SelectionChanged(Children[0] as NavigationButton); } } }
private void RotateThumb_DragStarted(object sender, DragStartedEventArgs e) { this.designerItem = DataContext as ContentControl; if (this.designerItem != null) { this.canvas = VisualTreeHelper.GetParent(this.designerItem) as Canvas; if (this.canvas != null) { this.centerPoint = this.designerItem.TranslatePoint( new Point(this.designerItem.Width * this.designerItem.RenderTransformOrigin.X, this.designerItem.Height * this.designerItem.RenderTransformOrigin.Y), this.canvas); Point startPoint = Mouse.GetPosition(this.canvas); this.startVector = Point.Subtract(startPoint, this.centerPoint); this.rotateTransform = this.designerItem.RenderTransform as RotateTransform; if (this.rotateTransform == null) { this.designerItem.RenderTransform = new RotateTransform(0); this.initialAngle = 0; } else { this.initialAngle = this.rotateTransform.Angle; } } } }
//Zmienna do blokowania wrzucania starego zamowienia do bazy public OrderInput(ContentControl contentControl) { _contentControl = contentControl; _order = new Order(); InitializeComponent(); _isOrderBeingRead = false; ClientNumberTextBox.Provider = new SuggestionProvider( x => Data.PhoneNumbers.Where(stringToCheck => stringToCheck.ToString().Contains(x))); StreetTextBox.Provider = new SuggestionProvider( x => Data.StreetList.Where(stringToCheck => stringToCheck.ToString().ToLower().Contains(x.ToLower()))); foreach (var pizza in Data.PizzasPrizeDictionary.Keys) AllPizzasList.Items.Add(pizza); foreach (var topping in Data.ToppingsDictionary.Values) AllToppingsList.Items.Add(topping); foreach (var topping in Data.SizePrizeDictionary.Keys) AllSizeList.Items.Add(topping); foreach (var topping in Data.DoughsDictionary.Values) AllDoughsList.Items.Add(topping); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); _ui_txtTitle = (TextBlock)GetTemplateChild("_ui_txtTitle"); if (null != (_ui_btnOpenClose = (Button)GetTemplateChild("_ui_btnOpenClose"))) _ui_btnOpenClose.Click += new RoutedEventHandler(_ui_btnOpenClose_Click); _ui_rectOpenClose = (Rectangle)GetTemplateChild("_ui_rectOpenClose"); _ui_brdContent = (Border)GetTemplateChild("_ui_brdContent"); _ui_cntContent = (ContentControl)GetTemplateChild("_ui_cntContent"); if (null != (_ui_dpHeader = (DockPanel)GetTemplateChild("_ui_dpHeader"))) _ui_dpHeader.MouseLeftButtonDown += new MouseButtonEventHandler(_ui_dpHeader_MouseLeftButtonDown); // Image cImg = new Image(); ImageBrush cIB = new ImageBrush(); cIB.ImageSource = new System.Windows.Media.Imaging.BitmapImage(new Uri("/controls.sl;component/Images/rp_open.png", UriKind.Relative)); cIB.Stretch = Stretch.None; _cOpenSymbol = cIB; // = cImg; cIB = new ImageBrush(); cIB.ImageSource = new System.Windows.Media.Imaging.BitmapImage(new Uri("/controls.sl;component/Images/rp_close.png", UriKind.Relative)); cIB.Stretch = Stretch.None; _cCloseSymbol = cIB; //= cImg; if(Title.IsNullOrEmpty()) Title = g.Common.sName; ProcessTitle(); ProcessIsOpen(); }
private void setup() { if (!DesignerProperties.GetIsInDesignMode(this)) return; var parent = this.Parent as FrameworkElement; while (parent != null) { if (parent.Parent == null) { var window = parent as ContentControl; if (window != null) { this.window = window; this.togglChrome = new TogglChrome(); var oldContent = window.Content as UIElement; window.Content = this.togglChrome; this.togglChrome.SetContent(oldContent); this.refreshData(); return; } } parent = parent.Parent as FrameworkElement; } throw new Exception("TogglWindowDesignTimeConverter must be descendend of ContentControl.\n\nTry rebuilding."); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); _watermarkContent = GetTemplateChild("watermarkContent") as ContentControl; if (_watermarkContent != null) DetermineWatermarkContentVisibility(); }
/// <summary> /// Initializes a new instance of <see cref="PopupWrapper"/>. /// </summary> public PopupWrapper() { this.container = new ContentControl(); this.popUp = new Popup(); this.popUp.Child = this.container; }
private static void OnPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e) { var taskbarItemInfo = (TaskbarItemInfo) dependencyObject; object content = GetContent(taskbarItemInfo); DataTemplate template = GetTemplate(taskbarItemInfo); if (template == null || content == null) { taskbarItemInfo.Overlay = null; return; } const int ICON_WIDTH = 32; const int ICON_HEIGHT = 32; var bmp = new RenderTargetBitmap(ICON_WIDTH, ICON_HEIGHT, 96, 96, PixelFormats.Default); var root = new ContentControl { ContentTemplate = template, Content = content }; root.Arrange(new Rect(0, 0, ICON_WIDTH, ICON_HEIGHT)); bmp.Render(root); taskbarItemInfo.Overlay = bmp; }
private void SetupArea(DockPosition position, ContentControl contentArea) { var extensionForThisArea = Extensions.Where(e => e.Metadata.Position == position).ToList(); if (extensionForThisArea.Count == 0) { contentArea.Visibility = System.Windows.Visibility.Collapsed; } else if (extensionForThisArea.Count == 1) { contentArea.Content = extensionForThisArea[0].Value; } else { TabControl tabControl = new TabControl(); foreach (var extension in extensionForThisArea) { var tabItem = new TabItem(); tabItem.Header = extension.Metadata.Name; tabItem.Content = extension.Value; tabControl.Items.Add(tabItem); } contentArea.Content = tabControl; } }
private void ResizeThumb_DragStarted(object sender, DragStartedEventArgs e) { this.designerItem = this.DataContext as ContentControl; if (this.designerItem != null) { this.canvas = VisualTreeHelper.GetParent(this.designerItem) as ContentPresenter; if (this.canvas != null) { this.transformOrigin = this.designerItem.RenderTransformOrigin; this.rotateTransform = this.designerItem.RenderTransform as RotateTransform; if (this.rotateTransform != null) { this.angle = this.rotateTransform.Angle * Math.PI / 180.0; } else { this.angle = 0.0d; } AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this.canvas); if (adornerLayer != null) { this.adorner = new SizeAdorner(this.designerItem); adornerLayer.Add(this.adorner); } } } }
public static ImageSource GetNewMessagesNotificationOverlay(Window window, DataTemplate template, int count = 0) { if (window == null) return null; var presentation = PresentationSource.FromVisual(window); if (presentation == null) return null; Matrix m = presentation.CompositionTarget.TransformToDevice; double dx = m.M11; double dy = m.M22; double iconWidth = 16.0 * dx; double iconHeight = 16.0 * dy; string countText = count.ToString(); RenderTargetBitmap bmp = new RenderTargetBitmap((int) iconWidth, (int) iconHeight, 96, 96, PixelFormats.Default); ContentControl root = new ContentControl { ContentTemplate = template, Content = count > 99 ? "…" : countText }; root.Arrange(new Rect(0, 0, iconWidth, iconHeight)); bmp.Render(root); return bmp; }
public WpfHexViewHostImpl(WpfHexViewMarginProviderCollectionProvider wpfHexViewMarginProviderCollectionProvider, WpfHexView wpfHexView, HexEditorOperationsFactoryService editorOperationsFactoryService, bool setFocus) { if (wpfHexViewMarginProviderCollectionProvider == null) throw new ArgumentNullException(nameof(wpfHexViewMarginProviderCollectionProvider)); if (wpfHexView == null) throw new ArgumentNullException(nameof(wpfHexView)); if (editorOperationsFactoryService == null) throw new ArgumentNullException(nameof(editorOperationsFactoryService)); contentControl = new ContentControl(); this.editorOperationsFactoryService = editorOperationsFactoryService; grid = CreateGrid(); HexView = wpfHexView; contentControl.Focusable = false; contentControl.Content = grid; contentControl.MouseWheel += ContentControl_MouseWheel; UpdateBackground(); HexView.BackgroundBrushChanged += HexView_BackgroundBrushChanged; containerMargins = new WpfHexViewMargin[5]; containerMargins[0] = CreateContainerMargin(wpfHexViewMarginProviderCollectionProvider, PredefinedHexMarginNames.Top, true, 0, 0, 3); containerMargins[1] = CreateContainerMargin(wpfHexViewMarginProviderCollectionProvider, PredefinedHexMarginNames.Bottom, true, 2, 0, 2); containerMargins[2] = CreateContainerMargin(wpfHexViewMarginProviderCollectionProvider, PredefinedHexMarginNames.BottomRightCorner, true, 2, 2, 1); containerMargins[3] = CreateContainerMargin(wpfHexViewMarginProviderCollectionProvider, PredefinedHexMarginNames.Left, false, 1, 0, 1); containerMargins[4] = CreateContainerMargin(wpfHexViewMarginProviderCollectionProvider, PredefinedHexMarginNames.Right, false, 1, 2, 1); Add(HexView.VisualElement, 1, 1, 1); Debug.Assert(!containerMargins.Any(a => a == null)); if (setFocus) { contentControl.Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() => { if (!HexView.IsClosed) HexView.VisualElement.Focus(); })); } }
// Be sure to call the base class constructor. public ContentAdorner(UIElement adornedElement) : base(adornedElement) { this.children = new VisualCollection(this); // // Create the content control // var contentControl = new ContentControl(); // // Bind the content control to the Adorner's ContentTemplate property, so we know what to display // var contentTemplateBinding = new Binding(); contentTemplateBinding.Path = new PropertyPath(AdornerContentTemplateProperty); contentTemplateBinding.Source = adornedElement; contentControl.SetBinding(ContentControl.ContentTemplateProperty, contentTemplateBinding); // // Add the ContentControl as a child // this.child = contentControl; this.children.Add(this.child); this.AddLogicalChild(this.child); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); m_leftButton = (Button)GetTemplateChild("PART_LeftButton"); m_rightButton = (Button)GetTemplateChild("PART_RightButton"); m_contentControl = (ContentControl)GetTemplateChild("PART_Content"); m_viewArea = (Border)GetTemplateChild("PART_ViewArea"); if (m_leftButton == null || m_rightButton == null || m_contentControl == null || m_viewArea == null) throw new Exception("Templet must contain PART_ViewArea, PART_Content, PART_UpButton and PART_DownButton"); m_leftButton.Click += LeftButtonOnClick; m_rightButton.Click += RightButtonOnClick; m_contentControl.Content = Content; //GradientStopCollection gradientStopCollection = new GradientStopCollection(); //m_topGradientStop = new GradientStop(Colors.Transparent, 0); //gradientStopCollection.Add(m_topGradientStop); //gradientStopCollection.Add(new GradientStop(Colors.Black, 0.01)); //gradientStopCollection.Add(new GradientStop(Colors.Black, 0.99)); //m_buttomGradientStop = new GradientStop(Colors.Transparent, 1); //gradientStopCollection.Add(m_buttomGradientStop); //m_viewArea.OpacityMask = new LinearGradientBrush(gradientStopCollection) { StartPoint = new Point(0, 0), EndPoint = new Point(1, 0)}; m_viewArea.SizeChanged += OnSizeChanged; if (m_thicknessAnimation != null) Storyboard.SetTarget(m_thicknessAnimation, m_contentControl); Update(); }
public void InitializeComponent() { if (!this._contentLoaded) { this._contentLoaded = true; Application.LoadComponent(this, new Uri("/TWC.OVP;component/Views/Shell/OnDemandShellView.xaml", UriKind.Relative)); this.userControl = (UserControl) base.FindName("userControl"); this.LayoutRoot = (Grid) base.FindName("LayoutRoot"); this.AssetInfoStates = (VisualStateGroup) base.FindName("AssetInfoStates"); this.ShowAssetInfo = (VisualState) base.FindName("ShowAssetInfo"); this.InfoPanelIn = (Storyboard) base.FindName("InfoPanelIn"); this.HideAssetInfo = (VisualState) base.FindName("HideAssetInfo"); this.ShowSmallAssetInfoPopupBubble = (VisualState) base.FindName("ShowSmallAssetInfoPopupBubble"); this.CaptionSettingsStates = (VisualStateGroup) base.FindName("CaptionSettingsStates"); this.ShowCaptionSettings = (VisualState) base.FindName("ShowCaptionSettings"); this.HideCaptionSettings = (VisualState) base.FindName("HideCaptionSettings"); this.CaptionSettingsPopupStates = (VisualStateGroup) base.FindName("CaptionSettingsPopupStates"); this.ShowSettingsBubble = (VisualState) base.FindName("ShowSettingsBubble"); this.HideSettingsBubble = (VisualState) base.FindName("HideSettingsBubble"); this.BackgroundRectangle = (Rectangle) base.FindName("BackgroundRectangle"); this.AssetViewer = (ContentControl) base.FindName("AssetViewer"); this.ClickToggleControlBarAction = (ActionMessage) base.FindName("ClickToggleControlBarAction"); this.controller = (OnDemandController) base.FindName("controller"); this.assetInfoContentControl = (BubbleContentControl) base.FindName("assetInfoContentControl"); this.captionBubble = (BubbleContentControl) base.FindName("captionBubble"); this.CaptionSettings = (ContentControl) base.FindName("CaptionSettings"); this.Interaction = (ContentControl) base.FindName("Interaction"); } }
public bool DetectCollision(ContentControl controlOne, ContentControl controlTwo) { // new Rect(X1, Y1, X2, Y2); Rect c1Rect = new Rect( new Point(Convert.ToDouble(controlOne.GetValue(Canvas.LeftProperty)), Convert.ToDouble(controlOne.GetValue(Canvas.TopProperty)) ), new Point(Convert.ToDouble(controlOne.GetValue(Canvas.LeftProperty)) + controlOne.ActualWidth, Convert.ToDouble(controlOne.GetValue(Canvas.TopProperty)) + controlOne.ActualHeight ) ); Rect c2Rect = new Rect( new Point(Convert.ToDouble(controlTwo.GetValue(Canvas.LeftProperty)), Convert.ToDouble(controlTwo.GetValue(Canvas.TopProperty)) ), new Point(Convert.ToDouble(controlTwo.GetValue(Canvas.LeftProperty)) + controlTwo.ActualWidth, Convert.ToDouble(controlTwo.GetValue(Canvas.TopProperty)) + controlTwo.ActualHeight ) ); c1Rect.Intersect(c2Rect); return !(c1Rect == Rect.Empty); }
private void root_Loaded(object sender, RoutedEventArgs e) { if (!_isLoaded) { if (!System.Windows.Interop.BrowserInteropHelper.IsBrowserHosted) { _parentWindow = (ContentControl)VTreeHelper.GetParentOfType(this, typeof(Window)); } else _parentWindow = (ContentControl)VTreeHelper.GetParentOfType(this, typeof(C1Window)); if (_parentWindow != null) { if (Scheduler == null) { Scheduler = _parentWindow.DataContext as C1Scheduler; } if (_parentWindow is Window) { ((Window)_parentWindow).Closed += new EventHandler(_parentWindow_Closed); } else { ((C1Window)_parentWindow).Closed += new EventHandler(_parentWindow_Closed); ((C1Window)_parentWindow).WindowStateChanged += new EventHandler<PropertyChangedEventArgs<C1WindowState>>(_parentWindow_WindowStateChanged); } } UpdateTitle(); remList.SelectionChanged += new SelectionChangedEventHandler(remList_SelectionChanged); UpdateTimer(1); remList.Focus(); _isLoaded = true; } ShowRemindersControl_CollectionChanged(null, null); }
private void MainToolsTab_Selected(object sender, RoutedEventArgs e) { var listBoxItem = sender as ListBoxItem; listBoxItem.Selected -= MainToolsTab_Selected; mainToolsView = KCVUIHelper.KCVContent.FindVisualChildren<ContentControl>().Where(x => x.DataContext is ToolsViewModel).Last(); mainToolsView.LayoutUpdated += MainToolsView_LayoutUpdated; }
/// <summary> /// Add a feedback adorner to a UI element. /// This is used to show when a connection can or can't be attached to a particular connector. /// 'indicator' will be a view-model object that is transformed into a UI element using a data-template. /// </summary> private void AddFeedbackAdorner(FrameworkElement adornedElement, object indicator) { AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this); if (feedbackAdorner != null) { if (feedbackAdorner.AdornedElement == adornedElement) { // No change. return; } adornerLayer.Remove(feedbackAdorner); feedbackAdorner = null; } // // Create a content control to contain 'indicator'. // The view-model object 'indicator' is transformed into a UI element using // normal WPF data-template rules. // ContentControl adornerElement = new ContentControl(); adornerElement.HorizontalAlignment = HorizontalAlignment.Left; adornerElement.VerticalAlignment = VerticalAlignment.Center; adornerElement.Content = indicator; // // Create the adorner and add it to the adorner layer. // feedbackAdorner = new FrameworkElementAdorner(adornerElement, adornedElement); adornerLayer.Add(feedbackAdorner); }
private async void MyMapView_MapViewTapped(object sender, Esri.ArcGISRuntime.Controls.MapViewInputEventArgs e) { MyMapView.Overlays.Items.Clear(); IEnumerable<KmlFeature> features = await (MyMapView.Map.Layers["kmlLayer"] as KmlLayer).HitTestAsync(MyMapView, e.Position); if (features.Count() > 0) { if (!string.IsNullOrWhiteSpace(features.FirstOrDefault().BalloonStyle.FormattedText)) { //Create WebBrowser to show the formatted text var browser = new System.Windows.Controls.WebBrowser(); browser.NavigateToString(features.FirstOrDefault().BalloonStyle.FormattedText); //Get the KmlPlacemark position var featurePosition = (features.FirstOrDefault() as KmlPlacemark).Extent; //Create ContentControl var cControl = new ContentControl() { Content = browser, MaxHeight = 500, MaxWidth = 450 }; //Add the ContentControl to MapView.Overlays MapView.SetViewOverlayAnchor(cControl, featurePosition.GetCenter()); MyMapView.Overlays.Items.Add(cControl); } } }
void AddedView(object sender, AddedViewEventArgs e) { NavigationButton button = new NavigationButton(); StackPanel panel = new StackPanel(); TextBlock title = new TextBlock(); title.TextAlignment = TextAlignment.Center; title.Text = e.View.Title; panel.Children.Add(title); Image icon = new Image(); icon.Source = new BitmapImage(new Uri("/Omniscient.Foundation.Contrib.Silverlight;Component/Resources/application_side_boxes.png", UriKind.Relative)); icon.Stretch = Stretch.Fill; ContentControl iconPlaceholder = new ContentControl(); iconPlaceholder.Height = 24.0; iconPlaceholder.Width = 24.0; iconPlaceholder.Content = icon; iconPlaceholder.Margin = new Thickness(3.0); panel.Children.Add(iconPlaceholder); button.Margin = new Thickness(0, 0, 3, 0); button.Content = panel; button.View = e.View; button.Click += new RoutedEventHandler(NavigationButton_Click); StackPanelContent.Children.Add(button); _buttons.Add(button); }
public ContentTransitionControl() { InitializeComponent(); _currentControl = Control1; _newControl = Control2; }
public FlipControlPage() { InitializeComponent(); var pageSize = new Size(200, 400); m_flip.SetChild(m_contentButton = new Button() { Background = Colors.Blue.ToCachedBrush(), FontSize = 120 }); m_flip.Size = pageSize; m_flip.FlipStarting += (sender, args) => { var oldValue = args.OldValue as int?; var newValue = args.NewValue as int?; if (oldValue != null && newValue != null && oldValue.Value != newValue.Value) { args.FlipDirection = (newValue.Value > oldValue.Value) ? FlipDirection.Next : FlipDirection.Previous; } }; m_contentButton.WatchDataContextChanged((oldValue, newValue) => { m_contentButton.Content = newValue; }); m_next.Click += (sender, args) => DataContext = ++value; m_previos.Click += (sender, args) => DataContext = --value; DataContext = value; }
public PageAirportDistances(Airport airport) { this.Airport = airport; InitializeComponent(); StackPanel panelAirports = new StackPanel(); panelAirports.Margin = new Thickness(0, 10, 50, 0); ContentControl lblHeader = new ContentControl(); lblHeader.ContentTemplate = this.Resources["AirportsHeader"] as DataTemplate; panelAirports.Children.Add(lblHeader); ListBox lbAirport = new ListBox(); lbAirport.ItemContainerStyleSelector = new ListBoxItemStyleSelector(); lbAirport.ItemTemplate = this.Resources["AirportItem"] as DataTemplate; lbAirport.MaxHeight = GraphicsHelpers.GetContentHeight() - 100; var airports = GameObject.GetInstance().HumanAirline.Airports.FindAll(a=>a!=this.Airport).OrderBy(a=>MathHelpers.GetDistance(a,this.Airport)); foreach (Airport destAirport in airports ) lbAirport.Items.Add(new KeyValuePair<Airport,Airport>(this.Airport,destAirport)); panelAirports.Children.Add(lbAirport); this.Content = panelAirports; }
public void GetChildrenByNameTest() { // Arrange var txt1 = new TextBlock { Name = "txt1" }; var border1 = new Border { Name = "border1", Child = txt1 }; var contentCtrl = new ContentControl { Name = "contentCtrl1", Content = border1 }; var txt2 = new TextBlock { Name = "txt1" }; var grid1 = new Grid { Name = "grid1" }; grid1.Children.Add(contentCtrl); grid1.Children.Add(txt2); var userCtrl1 = new UserControl { Name = "userCtrl1", Content = grid1 }; // Act var actual = userCtrl1.GetChildren("txt1"); // Assert Assert.AreEqual(actual.Count, 2); Assert.IsTrue(actual.Any(c => c.Equals(txt1))); Assert.IsTrue(actual.Any(c => c.Equals(txt2))); // Act actual = userCtrl1.GetChildren("contentCtrl1"); // Assert Assert.AreEqual(actual.Count, 1); Assert.IsTrue(actual.Any(c => c.Equals(contentCtrl))); // Act actual = contentCtrl.GetChildren("border1"); // Assert Assert.AreEqual(actual.Count, 1); Assert.IsTrue(actual.Any(c => c.Equals(border1))); }
public DialogManager( ContentControl parent, Dispatcher dispatcher) { _dispatcher = dispatcher; _dialogHost = new DialogLayeringHelper(parent); }
public void ShouldThrowArgumentNullException() { ContentControl parent = new ContentControl(); TextBlock child = new TextBlock(); parent.Content = child; TreeHelper.FindAncestor(child, null); }
public PageSelectLanguage() { InitializeComponent(); StackPanel panelContent = new StackPanel(); panelContent.Margin = new Thickness(10, 0, 10, 0); panelContent.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; WrapPanel panelButtons = new WrapPanel(); panelButtons.Margin = new Thickness(0, 100, 0, 0); panelContent.Children.Add(panelButtons); foreach (Language language in Languages.GetLanguages().FindAll(l => l.IsEnabled)) { ContentControl ccLanguage = new ContentControl(); ccLanguage.ContentTemplate = this.Resources["LanguageItem"] as DataTemplate; ccLanguage.Content = language; ccLanguage.Margin = new Thickness(0, 0, 20, 0); panelButtons.Children.Add(ccLanguage); } base.setTopMenu(new PageTopMenu()); base.hideNavigator(); base.hideBottomMenu(); base.setContent(panelContent); base.setHeaderContent("Select language"); showPage(this); }
public PagePerformance() { InitializeComponent(); StackPanel panelContent = new StackPanel(); panelContent.Margin = new Thickness(10, 0, 10, 0); panelContent.HorizontalAlignment = System.Windows.HorizontalAlignment.Center; ContentControl txtHeader = new ContentControl(); txtHeader.ContentTemplate = this.Resources["PerformanceHeader"] as DataTemplate; txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; panelContent.Children.Add(txtHeader); ListBox lbCounters = new ListBox(); lbCounters.ItemTemplate = this.Resources["PerformanceItem"] as DataTemplate; lbCounters.MaxHeight = GraphicsHelpers.GetContentHeight() - 50; lbCounters.ItemContainerStyleSelector = new ListBoxItemStyleSelector(); foreach (string pageCounter in PerformanceCounters.GetPages()) lbCounters.Items.Add(pageCounter); panelContent.Children.Add(lbCounters); base.setContent(panelContent); base.setHeaderContent("Performance Counters"); showPage(this); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.page = ((System.Windows.Controls.Grid)(target)); return; case 2: this.contentPresenter = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Controls = ((System.Windows.Controls.ContentControl)(target)); return; case 2: this.main = ((GGGC.Admin.ERP.Catalogs.Sales.Prices.Views.PriceView)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LayoutRoot = ((System.Windows.Controls.ContentControl)(target)); return; case 2: this.MessageWindow = ((NavigationAndDialogWpf.MessageWindow)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Menu = ((System.Windows.Controls.Menu)(target)); return; case 2: this.ActiveItem = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PlayListList = ((System.Windows.Controls.ListBox)(target)); return; case 2: this.PlayListContentControl = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Customer = ((System.Windows.Controls.DataGrid)(target)); return; case 2: this.CreateProduct = ((System.Windows.Controls.Button)(target)); return; case 3: this.Products = ((System.Windows.Controls.DataGrid)(target)); return; case 4: this.CreateFacture = ((System.Windows.Controls.Button)(target)); return; case 5: this.Number = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.Factures = ((System.Windows.Controls.DataGrid)(target)); return; case 7: this.CreateReceipt = ((System.Windows.Controls.Button)(target)); return; case 8: this.ReciptNumber = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.Receipts = ((System.Windows.Controls.DataGrid)(target)); return; case 10: this.ComputeBalance = ((System.Windows.Controls.Button)(target)); return; case 11: this.ActiveItem = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.contentControl = ((System.Windows.Controls.ContentControl)(target)); #line 17 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.contentControl_MouseLeftButtonDown); #line default #line hidden #line 18 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.MouseMove += new System.Windows.Input.MouseEventHandler(this.contentControl_MouseMove); #line default #line hidden #line 19 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.contentControl_MouseLeftButtonUp); #line default #line hidden #line 20 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.contentControl_MouseWheel); #line default #line hidden #line 21 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.MouseLeave += new System.Windows.Input.MouseEventHandler(this.contentControl_MouseLeave); #line default #line hidden #line 22 "..\..\..\WPFControl\ImageExt.xaml" this.contentControl.SizeChanged += new System.Windows.SizeChangedEventHandler(this.contentControl_SizeChanged); #line default #line hidden return; case 2: this.image = ((System.Windows.Controls.Image)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DailyBtn = ((System.Windows.Controls.RadioButton)(target)); #line 17 "..\..\..\Views\StatsView.xaml" this.DailyBtn.Checked += new System.Windows.RoutedEventHandler(this.DailyBtn_Checked); #line default #line hidden return; case 2: this.WeeklyBtn = ((System.Windows.Controls.RadioButton)(target)); #line 22 "..\..\..\Views\StatsView.xaml" this.WeeklyBtn.Checked += new System.Windows.RoutedEventHandler(this.WeeklyBtn_Checked); #line default #line hidden return; case 3: this.MonthlyBtn = ((System.Windows.Controls.RadioButton)(target)); #line 27 "..\..\..\Views\StatsView.xaml" this.MonthlyBtn.Checked += new System.Windows.RoutedEventHandler(this.MonthlyBtn_Checked); #line default #line hidden return; case 4: this.CusomterBtn = ((System.Windows.Controls.RadioButton)(target)); #line 32 "..\..\..\Views\StatsView.xaml" this.CusomterBtn.Checked += new System.Windows.RoutedEventHandler(this.CusomterBtn_Checked); #line default #line hidden return; case 5: this.ActiveItem = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.root = ((InterPol.MapUC)(target)); return; case 2: this.ResMap = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Controls = ((System.Windows.Controls.ContentControl)(target)); return; case 2: this.main = ((GGGC.Admin.Modules.Test.Test02.Views.TestView)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.frmMain = ((cscd349FinalProject.MainWindow)(target)); return; case 2: this.cctrlMain = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.GridCalendarLayout = ((System.Windows.Controls.Grid)(target)); return; case 2: this.BodyContent = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.control = ((System.Windows.Controls.ContentControl)(target)); return; case 2: this.scroller = ((System.Windows.Controls.ScrollViewer)(target)); return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/MediaVF.UI.Controls;component/SearchTextBox.xaml", System.UriKind.Relative)); this.Root = ((System.Windows.Controls.UserControl)(this.FindName("Root"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.InputTextBox = ((System.Windows.Controls.TextBox)(this.FindName("InputTextBox"))); this.MatchingItemsDropdown = ((System.Windows.Controls.Primitives.Popup)(this.FindName("MatchingItemsDropdown"))); this.ResultsPanel = ((System.Windows.Controls.ContentControl)(this.FindName("ResultsPanel"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 14 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 2: #line 16 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_3); #line default #line hidden return; case 3: #line 20 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_1); #line default #line hidden return; case 4: #line 21 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_2); #line default #line hidden return; case 5: this.MainContent = ((System.Windows.Controls.Grid)(target)); return; case 6: this.Main = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ArenaViewport = ((System.Windows.Controls.ContentControl)(target)); return; case 2: this.Graphs = ((GraphControl.CompositeGraph)(target)); return; } this._contentLoaded = true; }
public void HandleKeyDown(System.Windows.Controls.ContentControl sender, DependencyLogicalKey virtualKeyConfig, Dictionary <ContentControl, DependencyLogicalKey> virtualKeys) { var virtualKey = QuertyKeyboard.GetVirtualKey(sender) as VirtualKey; var userDefineKey = QuertyKeyboard.GetVirtualKey(sender) as UserDefinedKey; var isShiftVirtualKey = GetIsShiftVirtualKey(virtualKey); if (userDefineKey != null) { foreach (var kvp in _shiftKeys) { foreach (var control in _shiftKeys[kvp.Key]) { if (control is System.Windows.Controls.CheckBox) { var checkBox = control as System.Windows.Controls.CheckBox; checkBox.IsChecked = false; } else if (control is System.Windows.Controls.Primitives.ToggleButton) { var toggleButton = control as System.Windows.Controls.Primitives.ToggleButton; toggleButton.IsChecked = false; } } } } if (isShiftVirtualKey || virtualKey == null) { return; } foreach (var kvp in _shiftKeys) { foreach (var control in _shiftKeys[kvp.Key]) { var isKeyDown = virtualKey.KeyboardService.IsKeyDownAsync(kvp.Key); if (control is System.Windows.Controls.CheckBox) { var checkBox = control as System.Windows.Controls.CheckBox; checkBox.IsChecked = isKeyDown; } else if (control is System.Windows.Controls.Primitives.ToggleButton) { var toggleButton = control as System.Windows.Controls.Primitives.ToggleButton; toggleButton.IsChecked = isKeyDown; } } } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/OmegleITM;component/TopicPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.pageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("pageTitle"))); this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel"))); this.pageControl = ((System.Windows.Controls.ContentControl)(this.FindName("pageControl"))); this.topicList = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("topicList"))); this.topicEntryBox = ((System.Windows.Controls.TextBox)(this.FindName("topicEntryBox"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((VMS.Client.TrackingSystem.UserControls.MySearchExpanderControl)(target)); return; case 2: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 3: this.epdSearch = ((System.Windows.Controls.Expander)(target)); return; case 4: this.grdSearch = ((System.Windows.Controls.Grid)(target)); return; case 5: this.cmbSearch = ((System.Windows.Controls.ComboBox)(target)); #line 750 "..\..\..\UserControls\MySearchExpanderControl.xaml" this.cmbSearch.IsKeyboardFocusWithinChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.ComboBox_IsKeyboardFocusWithinChanged); #line default #line hidden return; case 6: this.mySearchExpanderContentControl = ((System.Windows.Controls.ContentControl)(target)); return; case 7: this.myInboxExpanderGrid = ((System.Windows.Controls.Grid)(target)); return; case 8: this.txtblCategory = ((System.Windows.Controls.TextBlock)(target)); return; case 9: this.cmbCategory = ((System.Windows.Controls.ComboBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.vDeviceSearchView = ((TextDashboard.UserControls.SearchDeviceView)(target)); return; case 2: this.Loading = ((System.Windows.Controls.ContentControl)(target)); return; case 3: this.ScanDeviceBorder = ((System.Windows.Controls.Border)(target)); return; case 4: this.ScanDeviceStackPanel = ((System.Windows.Controls.StackPanel)(target)); return; case 5: #line 39 "..\..\..\..\UserControls\SearchDeviceView.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseButton_OnClick); #line default #line hidden return; case 6: #line 46 "..\..\..\..\UserControls\SearchDeviceView.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 7: this.LoadingResult = ((System.Windows.Controls.ContentControl)(target)); return; case 8: this.StackPanelSearchResult = ((System.Windows.Controls.StackPanel)(target)); return; } this._contentLoaded = true; }
protected override void Initialize() { content = new swc.DockPanel(); base.Initialize(); Control.SizeToContent = sw.SizeToContent.WidthAndHeight; Control.SnapsToDevicePixels = true; Control.UseLayoutRounding = true; main = new swc.DockPanel(); menuHolder = new swc.ContentControl { IsTabStop = false }; toolBarHolder = new swc.ContentControl { IsTabStop = false }; content.Background = System.Windows.SystemColors.ControlBrush; swc.DockPanel.SetDock(menuHolder, swc.Dock.Top); swc.DockPanel.SetDock(toolBarHolder, swc.Dock.Top); main.Children.Add(menuHolder); main.Children.Add(toolBarHolder); main.Children.Add(content); Control.Content = main; Control.Loaded += delegate { SetResizeMode(); if (initialClientSize != null) { initialClientSize = null; SetContentSize(); } // stop form from auto-sizing after it is shown Control.SizeToContent = sw.SizeToContent.Manual; if (Control.ShowActivated) { Control.MoveFocus(new swi.TraversalRequest(swi.FocusNavigationDirection.Next)); } }; Control.PreviewKeyDown += (sender, e) => { // need to call validate on the input bindings before trying to execute them foreach (var binding in Control.InputBindings.Cast <swi.InputBinding>().Select(r => r.Command).OfType <IWpfValidateBinding>()) { binding.Validate(); } }; // needed to handle Application.Terminating event HandleEvent(Window.ClosingEvent); }
public void RegisterKey(System.Windows.Controls.ContentControl sender) { var instantaneousModifierKey = QuertyKeyboard.GetVirtualKey(sender) as InstantaneousModifierKey; var isShiftVirtualKey = GetIsShiftVirtualKey(instantaneousModifierKey); if (!isShiftVirtualKey) { return; } if (!_shiftKeys.ContainsKey(instantaneousModifierKey.KeyCode)) { _shiftKeys[instantaneousModifierKey.KeyCode] = new List <ContentControl>(); } _shiftKeys[instantaneousModifierKey.KeyCode].Add(sender); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DesignerItem = ((System.Windows.Controls.ContentControl)(target)); #line 215 "..\..\..\Views\ConfigurationModeView.xaml" this.DesignerItem.PreviewMouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.DesignerItem_OnPreviewMouseRightButtonDown); #line default #line hidden return; } this._contentLoaded = true; }
public override void UIThreadInitialise() { _toolContent = new System.Windows.Controls.ContentControl(); //_toolContent.Padding = new System.Windows.Thickness(3); //_toolContent.Margin = new System.Windows.Thickness(2); DropDownButton b = new DropDownButton(); b.SetResourceReference(Control.StyleProperty, "IconDropDownButtonStyle"); b.Content = Icon; //b.IsOpen = true; b.DropDownContent = DropDownContent; _toolContent.Content = b; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/OmegleITM;component/SettingsPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel"))); this.LiveTileCheckBox = ((System.Windows.Controls.CheckBox)(this.FindName("LiveTileCheckBox"))); this.UpdateLiveTileButton = ((System.Windows.Controls.Button)(this.FindName("UpdateLiveTileButton"))); this.CustomHostCheckBox = ((System.Windows.Controls.CheckBox)(this.FindName("CustomHostCheckBox"))); this.CustomHostContentControl = ((System.Windows.Controls.ContentControl)(this.FindName("CustomHostContentControl"))); this.CustomHostTextBox = ((System.Windows.Controls.TextBox)(this.FindName("CustomHostTextBox"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\..\Controls\ToggleButton_Control.xaml" ((Good_Teacher.Controls.ToggleButton_Control)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.UserControl_MouseEnter); #line default #line hidden #line 8 "..\..\..\Controls\ToggleButton_Control.xaml" ((Good_Teacher.Controls.ToggleButton_Control)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.UserControl_MouseLeave); #line default #line hidden #line 8 "..\..\..\Controls\ToggleButton_Control.xaml" ((Good_Teacher.Controls.ToggleButton_Control)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown); #line default #line hidden #line 8 "..\..\..\Controls\ToggleButton_Control.xaml" ((Good_Teacher.Controls.ToggleButton_Control)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp); #line default #line hidden #line 8 "..\..\..\Controls\ToggleButton_Control.xaml" ((Good_Teacher.Controls.ToggleButton_Control)(target)).MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseLeftButtonUp); #line default #line hidden return; case 2: this.CBorder = ((System.Windows.Controls.Border)(target)); return; case 3: this.Ccontent = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 22 "..\..\Shell.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemExit_Click); #line default #line hidden return; case 2: #line 24 "..\..\Shell.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemExit_Click); #line default #line hidden return; case 3: #line 25 "..\..\Shell.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemHelloWorld_Click); #line default #line hidden return; case 4: this.TreeViewMain = ((System.Windows.Controls.TreeView)(target)); #line 32 "..\..\Shell.xaml" this.TreeViewMain.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.TreeView_SelectedItemChanged); #line default #line hidden return; case 5: this.ContentControlMain = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/OmegleITM;component/ChatPage.xaml", System.UriKind.Relative)); this.TypingIndicator = ((Microsoft.Phone.Shell.ProgressIndicator)(this.FindName("TypingIndicator"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.titleBar = ((System.Windows.Controls.TextBlock)(this.FindName("titleBar"))); this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel"))); this.messageLLS = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("messageLLS"))); this.inputPanelControl = ((System.Windows.Controls.ContentControl)(this.FindName("inputPanelControl"))); this.inputPanel = ((System.Windows.Controls.StackPanel)(this.FindName("inputPanel"))); this.messageEntryBox = ((Coding4Fun.Toolkit.Controls.ChatBubbleTextBox)(this.FindName("messageEntryBox"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ring1 = ((System.Windows.Controls.Grid)(target)); return; case 2: this.contentControl = ((System.Windows.Controls.ContentControl)(target)); return; case 3: this.ring2 = ((System.Windows.Controls.Grid)(target)); return; case 4: this.contentControl1 = ((System.Windows.Controls.ContentControl)(target)); return; case 5: this.ring3 = ((System.Windows.Controls.Grid)(target)); return; case 6: this.contentControl2 = ((System.Windows.Controls.ContentControl)(target)); return; case 7: this.ring4 = ((System.Windows.Controls.Grid)(target)); return; case 8: this.contentControl3 = ((System.Windows.Controls.ContentControl)(target)); return; case 9: this.ring5 = ((System.Windows.Controls.Grid)(target)); return; case 10: this.contentControl4 = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btnCopy = ((System.Windows.Controls.Button)(target)); return; case 2: this.btnCut = ((System.Windows.Controls.Button)(target)); return; case 3: this.btnPaste = ((System.Windows.Controls.Button)(target)); return; case 4: this.btnDelete = ((System.Windows.Controls.Button)(target)); return; case 5: this.btnNewFolder = ((System.Windows.Controls.Button)(target)); return; case 6: this.btnNewTxtFile = ((System.Windows.Controls.Button)(target)); return; case 7: this.btnFind = ((System.Windows.Controls.Button)(target)); return; case 8: this.grExplorers = ((System.Windows.Controls.Grid)(target)); return; case 9: this.LeftShellControl = ((System.Windows.Controls.ContentControl)(target)); return; case 10: this.RightShellControl = ((System.Windows.Controls.ContentControl)(target)); return; } this._contentLoaded = true; }