public override void ApplySkin(XmlNode pSkinNode, string pSkinPath) { base.ApplySkin(pSkinNode, pSkinPath); TextPosition = new Point(0, 0); SkinningHelper.XmlPointEntry(XPATH_TEXT_POSITION, pSkinNode, ref _textPosition); if (SkinningHelper.XmlTextStyleEntry(XPATH_TEXT_STYLE, pSkinNode, ref _textStyle)) { _invalidateTextLayout = true; } }
public void ApplySkin(XmlNode pSkinNode, string pSkinPath) { Clear(); SkinningHelper.XmlRectangleEntry(XPATH_BOUNDS, pSkinNode, ref _bounds); _internalList.SelectedItemChanged += (sender, e) => { var listItem = e.SelectedItem as ShortcutListItem; AppMain.MediaManager.SetList(listItem.ListIndex); }; AppMain.MediaManager.ListChanged += (sender, e) => { // NEed to implement functionality to populate this shortcut list // and to change in this lambda _internalList.ClearList(); int i = 0; foreach (MediaHistory item in AppMain.MediaManager.MediaListHistory) { _internalList.InsertNext( new ShortcutListItem(item.ListIndex, item.DisplayString) { Selected = item.ListIndex == i }); i++; } }; XmlNode node = pSkinNode.SelectSingleNode(XPATH_DRAGABLE_LIST); if (node != null) { if (IndexOf(_internalList) < 0) { AddViewControl(_internalList); } _internalList.ApplySkin(node, pSkinPath); } }
public override void ApplySkin(XmlNode pSkinNode, string pSkinPath) { base.ApplySkin(pSkinNode, pSkinPath); this.AddViewControl(_currentOptionsView); this.AddViewControl(_dragableList); SkinningHelper.ApplySkinNodeIfExists(OPTIONS_LIST, pSkinNode, pSkinPath, _dragableList); SkinningHelper.ApplySkinNodeIfExists(OPTION_DETAILS, pSkinNode, pSkinPath, _currentOptionsView); XmlNode node = pSkinNode.SelectSingleNode(OPTION_VIEWS); if (node != null) { foreach (D2DViewControl control in _optionsViewList) { if (control is ISkinable) { SkinningHelper.ApplySkinNodeIfExists((control as IOptionControl).OptionElement, node, pSkinPath, (control as ISkinable)); } } } }
public virtual void ApplySkin(XmlNode pXmlNode, string pSkinPath) { Clear(); Name = pXmlNode.Name; if (SkinningHelper.XmlRectangleEntry(XPATH_BOUNDS, pXmlNode, ref _bounds)) { OnSizeChanged(null, null); } if (SkinningHelper.XmlValidFilePath(XPATH_BACKGROUND_IMAGE, pXmlNode, pSkinPath, ref _backGroundBitmapPath)) { _backGroundBitmap = null; } _hasColor = SkinningHelper.XmlColorEntry(XPATH_BACKGROUND_COLOR, pXmlNode, ref _backgroundColor); if (_hasColor) { _backgroundColorBrush = null; } foreach (XmlNode childNode in pXmlNode.ChildNodes) { if (childNode.NodeType == XmlNodeType.Element) { var viewControl = ViewControlFactory.GetViewControlAndApplySkin(childNode.Name, pSkinPath, childNode); if (viewControl != null) { AddViewControl(viewControl); } } //if (viewControl is ThermometerProgressBar) //{ // _progressBar = viewControl as ThermometerProgressBar; ; //} } }
public void ApplySkin(XmlNode pXmlNode, string pSkinPath) { SkinningHelper.XmlRectangleEntry(XPATH_BOUNDS, pXmlNode, ref _bounds); SkinningHelper.XmlValidFilePath(XPATH_OVERLAY_MASK, pXmlNode, pSkinPath, ref _overlayMaskPath); SkinningHelper.XmlValidFilePath(XPATH_BACKGROUND, pXmlNode, pSkinPath, ref _backgroundPath); }