نمایش داده نشدن استایل blend در VS2010
سلام به همه ی دوستان.
من در نرم افزار blend استایلی رو برای button ساختم که تو برنامه ی اصلی که میخوام ازش استفاده کنم desigin time error این شکلی میده:
'[Unknown]' property does not point to a DependencyObject in path '(0).(1)[0].(2)'
البته در زما ن اجرا مشکلی پیش نمی یاد و به درستی کار میکنه. خوب کد استایل بصورت زیر .دوستان اگه میتونن
راهنمایی کنن.
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ButtonStyle2" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Gra dientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
<EasingColorKeyFrame KeyTime="0" Value="#FF37E22A"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Gra dientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border">
<EasingColorKeyFrame KeyTime="0" Value="#FF22CA14"/>
<EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF1AF706"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Gra dientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border">
<EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF1FB412"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Gra dientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border">
<EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF37FD26"/>
</ColorAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(Gra dientBrush.GradientStops)[2].(GradientStop.Offset)" Storyboard.TargetName="border">
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.5"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed"/>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="border" BorderBrush="Black" BorderThickness="1" CornerRadius="7">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF11680A" Offset="0"/>
<GradientStop Color="#FF13FF00" Offset="1"/>
<GradientStop Color="#FF168F0C" Offset="0.483"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsDefaulted" Value="True"/>
<Trigger Property="IsMouseOver" Value="True"/>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Resource dictionary entries should be defined here. -->
</ResourceDictionary>
نقل قول: '[Unknown]' property does not point to a DependencyObject in path '(0).(1)[0].(2)'
سلام . دوست عزیز اگر قبل از ایجاد تاپیک اندکی حوصله به خرج بدی و جستجو کنی حتما جواب خودتو پیدا میکنی .
همینطور که آقای مهندس فرزاد فرمودند وقتی که شما با Blend پروژه رو روی دات نت 4 ایجاد میکنید برنامه در حقیقت بر روی NET Framework 4 Clien Profile
تنظیم میشه و بعضی از انیمیشن ها بخصوص زمانی که از States ها استفاده میکنید در این حالت در ویزارد VS2010 قابل مشاهده نیستند ولی در اجرا مشکل ندارند
پس در vs2010 دات نت برنامه رو از حالت NET Framework 4 Clien Profile به روی حالت NET Framework 4. قرار بدید
انشالله مشکل حل خواهد شد
ولی در کل نگران این مسئله نباشد این در اجرای برنامه شما خللی ایجاد نمیکند شما تمام طراحی را در بلند انجام دهید و در حالت NET Framework 4 Clien Profile از عدم نمایش آن در VS نگران نشوید
نقل قول: '[Unknown]' property does not point to a DependencyObject in path '(0).(1)[0].(2)'
من ابتدا جستجو کردم ولی نتونستم پیدا کنم ، میشه بگید کدوم تایپک ، کاری که گفتید انجام دادم ولی مشکل همچنان باقیست.
نقل قول: '[Unknown]' property does not point to a DependencyObject in path '(0).(1)[0].(2)'
نقل قول:
نوشته شده توسط
mehdi mahbobi
من ابتدا جستجو کردم ولی نتونستم پیدا کنم ، میشه بگید کدوم تایپک ، کاری که گفتید انجام دادم ولی مشکل همچنان باقیست.
اینم لینک !!!