Ejemplo n.º 1
0
        protected override BaseFrameworkElement CreateElementOnStartDrag()
        {
            bool       flag       = true;
            Asset      asset      = this.Asset;
            TypeAsset  typeAsset  = asset as TypeAsset;
            StyleAsset styleAsset = asset as StyleAsset;

            if (typeAsset != null && typeAsset.Type is IUnreferencedType)
            {
                flag = false;
            }
            else if (styleAsset != null)
            {
                UserThemeAssetProvider themeAssetProvider = styleAsset.Provider as UserThemeAssetProvider;
                if (themeAssetProvider != null && !themeAssetProvider.IsLocal)
                {
                    flag = false;
                }
            }
            if (flag && asset.CanCreateInstance(this.ActiveSceneInsertionPoint))
            {
                return(this.CreateInstance(Rect.Empty) as BaseFrameworkElement);
            }
            return((BaseFrameworkElement)null);
        }
Ejemplo n.º 2
0
 public UserThemeStyleAssetInstantiator(SceneView sceneView, UserThemeAssetProvider provider, UserThemeAssetProvider.UserThemeStyleAsset styleAsset)
     : base(sceneView, (StyleAssetProvider)provider, (StyleAsset)styleAsset)
 {
     this.provider = provider;
 }
Ejemplo n.º 3
0
 public UserThemeStyleAsset(UserThemeAssetProvider provider, ResourceModel resourceModel)
     : base((ResourceDictionaryAssetProvider)provider, resourceModel)
 {
     this.provider = provider;
 }