.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Resolve x:Type Markup Extension

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Windows Application
 

Hello all,

I am trying to resolve this:

{x:Type Button}

into a valid type Button (System.Windows.Controls.Button).

 

What I see is that the TypeExtension class can handle this (actually, it does for xaml parsing), but I want to do this without an app. However, for that I need an implementation of the IXamlTypeResolver interface, but there is only one (and that's internal).

 

Is there ANY way to resolve this? I can create a custom ParserContext with all the required namespaces, but I cannot seem to initialize the xaml type resolver to fix my issue.

 

Thanks in advance!


Geert van Horrik - CatenaLogic
Visit my blog: http://blog.catenalogic.com

Looking for a way to deploy your updates to all your clients? Try Updater!


View Complete Post


More Related Resource Links

Custom markup extension or custom binding class?

  
Hey experts! I'm doing a project where I've encountered an issue I'd love some feedback on. I've created a custom Markup Extension called MyMarkupExtension, with two properties.  I can use it like below: <cc:DialogBorder Title="{local:MyMarkupExtension MyProperty='property value goes here', AnotherProperty='and another value here'}"> It works, and in 99% of the cases, it fits my needs perfectly.  In 1% of the cases, the values of MyProperty and AnotherProperty can not be set at design time, so I'd need some binding there. <cc:DialogBorder Title="{local:MyMarkupExtension MyProperty={Binding Path='SomePropertyOfTheViewModel'}, AnotherProperty='and another value here'}"> This presents my two questions (yes I did make only one post for 2 questions, bad karma...): 1. the binding inside my markup is not legal, after all, a binding can only be set on a DependencyProperty.  Is there any workaround which I could use for this problem at hand? In case there isnt... 2. I'm thinking about dropping the markup extension and creating a custom binding instead.  For this, I'd have to inherit from bindingbase, and so far I've read online that's one ____ of a nightmare.  Does anyone have some good code / examples on where to start? "The improbable we do, the impossible just takes

Help to resolve an error "The conversion of a char data type to a datetime data type resulted in an

  
Why am I getting an error when executing this: select convert(datetime, '2010-09-12T18:11:48', 120) The message is: "Msg 242, Level 16, State 3, Line 1 The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." I don’t get the error if I remove “T” from the string. But I need it to work with “T”.

Most Common SharePoint Extension Type

  

Hi,

I am considering several extension options to overcome some of the limitations of the built-in web services. I looked at custom web services, .wsp solution packages, and web parts. What is the most commonly used extension method by customers? since this will be used by other organizations I'd like to use the most common extension method. Are there other extension options that let me access all sharepoint objects from a remote machine?

Any recommendations/suggestions will be highly appreciated.

Thanks

Tsvika

 

 


SharePoint Extension Type Recommendation

  

Hi,

I am considering several extension options to overcome some of the limitations of the built-in web services. I looked at custom web services, .wsp solution packages, and web parts. What is the most commonly used extension method by customers? since this will be used by other organizations I'd like to use the most common extension method. Are there other extension options that let me access all sharepoint objects from a remote machine?

Any recommendations/suggestions will be highly appreciated.

Thanks

Tsvika


Using markup extension's property as property element

  

Hello, I am learning WPF and I wonder how to use property of markup extension as property element.

I have this extension, which simply returns what is set to Value property:

namespace Ch2CustomMarkupExtension
{
  using System;
  using System.Windows.Markup;

  [MarkupExtensionReturnType(typeof(string))]
  public class MyExtension : MarkupExtension
  {
    public MyExtension()
    {
      this.Value = "undefined";
    }

    public MyExtension(string value)
    {
      this.Value = value;
    }

    public string Value
    {
      get; set;
    }

    public override object ProvideValue(IServiceProvider serviceProvider)
    {
      

The filtering process could not be initialized. Verify that the file extension is a known type and i

  

I have medium farm in sharepoint 2007 and sql 2005.

I see errors in the crawl log due to file extension is not known for PPTX .

Where can I add file extension? What is the best way to handle this error?

 


Sara


TreeSelector : playing with generics and type inference

  
create a generic way to define a selection starting from a tree of objects, the most simpler way as possible.

Let's start with the beginning...
Here is a very simple little interface defining a node of the tree, basically, a value and the references to the child nodes.

The Decorator Pattern & Extension Methods

  
The decorator pattern provides a formal way to add new functionality to an existing type, without sub-classing. First question: What is wrong with classical inheritance? In and of itself, nothing is wrong with the good old Is-A relationship. It is very common to derive a new class from an existing base class in order to override a few virtual members, and add a pinch of new functionality.

Microsoft's Collaborative Application Markup Language (CAML) Loop

  
discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

The Decorator Pattern & Extension Methods

  
Numerous design patterns exist in the software world today, and ultimately nothing is preventing you from making your own (if people buy into it or not is another question). Furthermore, there is no 'master list' of patterns that all developers agree upon. While this is true, if you pick up any book on the subject, you will find a set of very common patterns most programmers agree are very useful. Many of these patterns were first formalized in the seminal book on the subject, Design Patterns: Elements of Reusable Object-Oriented Software (aka, the Gang of Four [GOF] book; not to be confused with the UK punk band of the same name).

UnTyped DataSets and Strongly Type DataSets

  
We all are use datasets as a means of carrier of data from one layer to another. Most of the time we are using weakly typed datasets. In this article I will explain the differences between weakly typed datasets and strongly type datasets

Code spelling checker extension for visual studio 2010

  
Building a spelling checker for source code as an extension for visual studio 2010.

Voice eXtensible Markup Language

  
Abstract

This document specifies VoiceXML, the Voice Extensible Markup Language. VoiceXML is designed for creating audio dialogs that feature synthesized speech, digitized audio, recognition of spoken and DTMF key input, recording of spoken input, telephony, and mixed-initiative conversations. Its major goal is to bring the advantages of web-based development and content delivery to interactive voice response applications.
Status of This Document

This document is a submission to the World Wide Web Consortium from the VoiceXML Forum (see Submission Request, W3C Staff Comment). For a full list of all acknowledged Submission, please see Acknowledged Submissions to W3C.

This document is a Note made available by W3C for discussion only. This work does not imply endorsement by, or the consensus of the W3C membership, nor that W3C has, is, or will be allocating any resources to the issues addressed by the Note. This document is a work in progress and may be updated, replaced, or rendered obsolete by other documents at any time.

Gmail style multiple Sign-in type combo...is it possible in asp.net?

  

I am developing a multi-company application and want my users to give the functionality like the following to switch companies.

http://gmailblog.blogspot.com/2010/08/access-two-gmail-accounts-at-once-in.html

Is this possible? then how?

Please help


Thanks



Type or namespace error.

  

A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the 



Error 4 The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?) C:\Dev\Fiscal_Portal\Implementation\FMS Portal Site_new\App_Code\BLL\DataTables.cs 1 7 C:\...\FMS Portal Site_new\

The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)

error message that would typically be received when the dll has not been added as a reference or added in a using statement.


I can eliminate the error by adding an

<add

Bug: Does not change column type from nvarchar to ntext

  

Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.


The number of members in the conceptual type ... does not match with the number of members on the ob

  

 Hello,

I've added a scalar property to an entity and now ASP.NET Dynamic Data scaffolding throws this error:

The number of members in the conceptual type 'TrainingModel.Users' does not match with the number of members on the object side type 'TrainingModel.Users'. Make sure the number of members are the same.

This happens at the following line in global.asax:
model.RegisterContext(typeof(TrainingModel.TrainingEntities), new ContextConfiguration() { ScaffoldAllTables = true });

Please help!
Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend