problem about markup-extensions-Collection of common programming errors


  • Spook
    wpf localization properties markup-extensions
    I’m doing a small research on localisation methods in WPF. I heard about the idea with markup extension:<Label Content=”{local:Translate {– label ID here –}}” />I like this solution very much: it’s extremely easy to implement and seems to be nicely flexible. I’ve got one concern, however. Let’s suppose, that user changes the locale in the runtime. How to ensure, that localized properties will be reevaluated to match new language?

  • Developer’s Destiny
    wpf xaml markup-extensions dynamicresource systemcolors
    I have a corner case where both dynamic resources (don’t allow for converters) and custom markup extensions (only evaluated once) won’t do the trick. I want to create gradient brushes based on faded variants of the current system colors. Those brushes should update themselves whenever the system’s color theme changes, so that users don’t need to restart the application in case they switch to an accessibility theme.Is it possible to detect changes of the system’s color theme at runtime within an

  • Will
    wpf arrays types markup-extensions
    Long story short, I need to do this:ExpressionType=”{x:Type sys:Byte[]}”In other words, I need to do this:foo.ExpressionType=typeof(byte[]);Wat do?Update: Its a bug in the 2010 design surface. It works fine at runtime.

  • Edison Gustavo Muenz
    c# wpf markup-extensions
    I have a wpf application and I’m starting to localize it. The strategy for localization I chose was to create my custom MarkupExtension class.I won’t be using the .res files since at my company there is a solution that is already made which creates an encrypted map with all the strings and it requires int keys to refer to each string. So I wrote a custom generator that creates an enum with all the ‘int’ keys (could be a static class with ints, it doesn’t really matter).So I want to refer to each

  • Athari
    c# .net wpf xaml markup-extensions
    Even after simplifying the problem to minimal code, I still can’t understand what can cause NullReferenceException.Create new WPF Application “MarkupExtParam”. Replace code:MainWindow.xaml:<Window x:Class=”MarkupExtParam.MainWindow”xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”xmlns:my=”clr-namespace:MarkupExtParam”Content=”{Binding}”><Control.DataContext><my:Foo/></Control.DataContext><Control.Re

  • MCRXB
    c# wpf converter markup-extensions
    I’m trying to create a Markup Extension that will take a string of HTML, convert it to a FlowDocument, and return the FlowDocument. I’m fairly new to creating Markup Extensions and I’m hoping this will be obvious to someone with more experience. Here is my code:[MarkupExtensionReturnType(typeof(FlowDocument))] public class HtmlToXamlExtension : MarkupExtension {public HtmlToXamlExtension(String source){this.Source = source;}[ConstructorArgument(“source”)]public String Source { get; set; }public

  • H.B.
    .net wpf vb.net c#-to-vb.net markup-extensions
    I’m trying to create a VB.Net Markup Extension per this blog post but in vb.net<Application x:Class=”Application”xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”ShutdownMode=”OnExplicitShutdown”><Application.Resources> </Application.Resources><JumpList.JumpList><JumpList ShowRecentCategory=”True”><JumpTask Title=”Save as…” Arguments=”-saveas”ApplicationPath=”{local:ApplicationFullPath

Web site is in building