Click here to Skip to main content
15,909,835 members
Home / Discussions / C#
   

C#

 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 8:08
mveOriginalGriff2-May-16 8:08 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 8:13
mveOriginalGriff2-May-16 8:13 
GeneralRe: App Started With Rundll32.exe - Check If Open And Close It Pin
Kevin Marois2-May-16 8:48
professionalKevin Marois2-May-16 8:48 
GeneralRe: App Started With Rundll32.exe - Check If Open And Close It Pin
OriginalGriff2-May-16 9:41
mveOriginalGriff2-May-16 9:41 
AnswerRe: App Started With Rundll32.exe - Check If Open And Close It Pin
Richard Deeming4-May-16 2:13
mveRichard Deeming4-May-16 2:13 
QuestionConnect to ODBC located in Remote Machine Pin
Jassim Rahma2-May-16 3:59
Jassim Rahma2-May-16 3:59 
AnswerRe: Connect to ODBC located in Remote Machine Pin
Richard MacCutchan2-May-16 4:57
mveRichard MacCutchan2-May-16 4:57 
AnswerRe: Connect to ODBC located in Remote Machine Pin
Gerry Schmitz3-May-16 6:00
mveGerry Schmitz3-May-16 6:00 
QuestionHow to activate the Keyboard direction key "up key" to zoom the chart Pin
Member 120434382-May-16 2:57
Member 120434382-May-16 2:57 
AnswerRe: How to activate the Keyboard direction key "up key" to zoom the chart Pin
Dave Kreskowiak2-May-16 5:33
mveDave Kreskowiak2-May-16 5:33 
AnswerRe: How to activate the Keyboard direction key "up key" to zoom the chart Pin
Bernhard Hiller2-May-16 21:00
Bernhard Hiller2-May-16 21:00 
Questionfeature extraction methods in image quality assessment Pin
Safaeian30-Apr-16 22:28
Safaeian30-Apr-16 22:28 
AnswerRe: feature extraction methods in image quality assessment Pin
OriginalGriff30-Apr-16 23:02
mveOriginalGriff30-Apr-16 23:02 
Questionimage structural information Pin
Safaeian30-Apr-16 21:39
Safaeian30-Apr-16 21:39 
AnswerRe: image structural information Pin
Richard MacCutchan1-May-16 1:13
mveRichard MacCutchan1-May-16 1:13 
QuestionHello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
Member 1249073930-Apr-16 7:21
Member 1249073930-Apr-16 7:21 
QuestionRe: Hello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
Richard MacCutchan30-Apr-16 20:47
mveRichard MacCutchan30-Apr-16 20:47 
AnswerRe: Hello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
OriginalGriff30-Apr-16 20:51
mveOriginalGriff30-Apr-16 20:51 
QuestionUse report Wizard or FastReport to generate report from outcome Pin
wilcoten29-Apr-16 9:29
wilcoten29-Apr-16 9:29 
QuestionGet Instance Of Class By Name Pin
Kevin Marois29-Apr-16 7:50
professionalKevin Marois29-Apr-16 7:50 
AnswerRe: Get Instance Of Class By Name Pin
Gerry Schmitz29-Apr-16 13:02
mveGerry Schmitz29-Apr-16 13:02 
AnswerRe: Get Instance Of Class By Name Pin
Afzaal Ahmad Zeeshan30-Apr-16 10:08
professionalAfzaal Ahmad Zeeshan30-Apr-16 10:08 
AnswerRe: Get Instance Of Class By Name Pin
Richard Deeming4-May-16 2:08
mveRichard Deeming4-May-16 2:08 
This sounds like something that would be better as a Markup Extension[^]. The ProvideValue method[^] will be passed an IServiceProvider instance, from which you can obtain an IXamlTypeResolver[^] instance which you can use to resolve types in exactly the same way as the rest of WPF - it will even work at design-time.

If you need to support generic types, it gets a bit more complicated because of changes made in .NET 4.0; you have to use a combination of IXamlNamespaceResolver and IXamlSchemaContextProvider to resolve the type:
C#
var resolver = GetRequiredService<IXamlNamespaceResolver>(serviceProvider);
var schema = GetRequiredService<IXamlSchemaContextProvider>(serviceProvider);

var xamlNs = resolver.GetNamespace(namespaceName);
string genericTypeName = string.Format(CultureInfo.InvariantCulture, "{0}`{1:D}", typeName, typeArguments.Length);

var xamlTypeName = new XamlTypeName(xamlNs, genericTypeName);
Type genericType = schema.SchemaContext.GetXamlType(xamlTypeName).UnderlyingType;

Type finalType = genericType.MakeGenericType(typeArguments);

Markup Extension for Generic Classes[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionHelp please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 3:51
wilcoten29-Apr-16 3:51 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 3:57
mveOriginalGriff29-Apr-16 3:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.