Beispiel #1
0
 public StateGroupModel(VisualStateGroupSceneNode sceneNode)
 {
     this.sceneNode          = sceneNode;
     this.FluidLayoutEnabled = BlendSdkHelper.IsSdkInstalled(sceneNode.ProjectContext.TargetFramework);
     this.DefaultTransition  = new TransitionModel((VisualStateTransitionSceneNode)null, this);
     this.parkedTransitions.Add(this.DefaultTransition);
 }
Beispiel #2
0
 private static bool CanSupportExtendedVisualStateManager(SceneNode editingContainer)
 {
     if (editingContainer.ProjectContext.IsCapabilitySet(PlatformCapability.VsmInToolkit))
     {
         IType type = editingContainer.ProjectContext.ResolveType(ProjectNeutralTypes.VisualStateManager);
         if (!editingContainer.ProjectContext.PlatformMetadata.IsNullType((ITypeId)type) && !type.RuntimeAssembly.Version.ToString(4).Equals("3.5.40128.1", StringComparison.Ordinal))
         {
             return(false);
         }
     }
     return(BlendSdkHelper.IsSdkInstalled(editingContainer.ProjectContext.TargetFramework));
 }
Beispiel #3
0
 internal static bool EnsureBlendSDKLibraryAssemblyReferenced(SceneViewModel sceneViewModel, string assemblyName)
 {
     if (sceneViewModel == null || string.IsNullOrEmpty(assemblyName))
     {
         return(false);
     }
     if (sceneViewModel.ProjectContext.GetAssembly(assemblyName) != null)
     {
         return(true);
     }
     if (!BlendSdkHelper.IsSdkInstalled(sceneViewModel.ProjectContext.TargetFramework) || !sceneViewModel.ProjectContext.EnsureAssemblyReferenced(assemblyName))
     {
         return(false);
     }
     sceneViewModel.DesignerContext.ViewUpdateManager.RebuildPostponedViews();
     return(true);
 }
 public override ConversionType GetVersion(ConversionTarget file)
 {
     if (file.IsProject && BlendSdkHelper.IsAnyCurrentVersionSdkInstalled)
     {
         IEnumerable <string> projectImports = file.ProjectStore.ProjectImports;
         if (projectImports != null)
         {
             if (BlendSdkHelper.IsSdkInstalled(BlendSdkHelper.CurrentWpfVersion))
             {
                 if (projectImports.Contains <string>("SubsetFont.targets"))
                 {
                     return(ConversionType.BlendSdkFontEmbedding2);
                 }
                 if (projectImports.Contains <string>("$(MSBuildExtensionsPath)\\Microsoft\\Expression\\Blend\\3.0\\WPF\\Microsoft.Expression.Blend.WPF.targets"))
                 {
                     return(ConversionType.BlendSdkFontEmbedding3);
                 }
                 if (projectImports.Contains <string>(BlendSdkHelper.CurrentVersionWpfTargetsFile))
                 {
                     return(ConversionType.BlendSdkFontEmbedding4);
                 }
             }
             if (BlendSdkHelper.IsSdkInstalled(BlendSdkHelper.CurrentSilverlightVersion))
             {
                 if (projectImports.Contains <string>("SubsetFontSilverlight.targets"))
                 {
                     return(ConversionType.BlendSdkFontEmbedding2);
                 }
                 if (projectImports.Contains <string>("$(MSBuildExtensionsPath)\\Microsoft\\Expression\\Blend\\3.0\\Silverlight\\Microsoft.Expression.Blend.Silverlight.targets"))
                 {
                     return(ConversionType.BlendSdkFontEmbedding3);
                 }
                 if (projectImports.Contains <string>(BlendSdkHelper.CurrentVersionSilverlightTargetsFile))
                 {
                     return(ConversionType.BlendSdkFontEmbedding4);
                 }
             }
         }
     }
     return(ConversionType.Unknown);
 }
 public static bool IsEnabled(ITypeResolver typeResolver)
 {
     return(typeResolver.IsCapabilitySet(PlatformCapability.SupportAddTriggerDataDragDrop) && BlendSdkHelper.IsSdkInstalled(typeResolver.PlatformMetadata.TargetFramework));
 }