سؤال

أنا حاليا باستخدام WPF .NET 3.5 للتطوير، باستخدام محول الرياضيات في Ikriv، قررت القيام بمهمة رياضية في تصميمي: giveacodicetagpre.

+ مساعدة استثناء يقول:

intrexception: system.invalidcastexception

رسالة= غير قادر على إلقاء كائن من النوع "System.windows.templateBindingExpression" لكتابة "System.String".

شكرا.

هل كانت مفيدة؟

المحلول

Yes, there is an error in that line. Please give some more information about where is the button you refer to in that binding.

If it's the control that you create template for, you can try to remove the line:

<!-- this line causes an error -->
<Binding Path="Object" ElementName="{TemplateBinding Property=Button.Height}" />

and replace it with a new one:

<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Height" />
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top