Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am new with WPF. Had question about Objecttype in ObjectBindingProvider.

Example:
<stackpanel.resources>
<ObjectDataProvider ObjectType="{x:Type m:StringData}"
x:Key="objStrings" MethodName="GetStrings"/>


what is use of x and m in objecttype?

Any idea?
Posted

1 solution

They are namespace prefixes - MSDN documentation[^]

x: is likely to be
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

m: is likely to be
C#
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF">

Have a look at the top of your XAML and you will see the namespaces you are using listed in the Window tag.

In your example x:Type is used instead of Type to distinguish it from the one in
xmlns:system="clr-namespace:System;assembly=mscorlib"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900