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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Xaml cannot find StaticResource even sure the resource is defined

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :WPF


I'm having trouble using static resources for color schemes in my user interface library. I have my Generic.xaml file, where I "include" all the other resource dictionary files:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


  <ResourceDictionary Source="/Moonlite.Platform.Shell.UI;component/Themes/ColorSchemes/Default.xaml" />


View Complete Post

More Related Resource Links

I have 3 triggers defined on an sqlserver2008 table and I can't find them with c#

I've got the code below and when I run it, it always says there are 0 triggers in table.Triggers.  I added some debugging code checkin the table.HasDeleteTrigger, etc. and from that, I get the exception: "To accomplish this action, set property HasDeleteTrigger." when I try to set it to bool hasDeleteTrigger. I can get stored procedures find, just not triggers. Below is my problem code: foreach (Database database in databaseCollection) { if (database.Name.Equals(catalogName)) { // first we need to delete triggers associated with all tables that begin // with our prefix. we can skip our the framework tables because those // don't have triggers on them // grab all tables, filter for non prefixed ones in foreach loop so we can delete triggers from non prefixed ones results.AddRange(from Table table in database.Tables select table.Name); foreach (var tableName in results) { var table = new Table(database, tableName, CrSyncDbSchemaName); table.Refresh(); bool hasDeleteTrigger = table.HasDeleteTrigger; bool hasAfterTrigger = table.HasAfterTrigger; bool hasInsertTrigger = table.HasInsertTrigger;

Initializing CommandBindings in XAML using a CommandBindingCollection static resource

Hi, I have defined a CommandBindingCollection object in <Window.Resources> and now I would like to use it as multiple controls' <Control.CommandBindings>.  Unfortunately, I can't find the right syntax. Any help will be appreciated. Thanks.  

cannot find resource login.aspx

I have set up users with the membership provider and thus have a database in my vwd2008 app named aspnetdb.mdf.  I added another "database2" to the app.  I set up a form to login called Default.aspx.  Once logged In the user is taken to Default2.aspx.  On Default2, I have a GridView connected to database2.  What I am doing is trying to view Default2 without logging in and prompt a response.  Instead I get the error 404 that login.aspx cannot be found.  HOw do I correct this? On Default2 Page Load......If Not Page.IsPostBack Then Response.Write("Gotcha") End If Does this have anything to do with me using two databases in the same web app ?

Unable to find static resource in runtime even while designer can see it

So i have:    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Werp.MigrationHelper"> <Style TargetType="{x:Type UserControl}" x:Key="WizardPageControl" x:Name="WizardPageControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type UserControl}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="10" /> <ColumnDefinition Width="475" /> <ColumnDefinition Width="10" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="10" /> <RowDefinition Height="410"/> <RowDefinition Height="50" /> <RowDefinition Height="10" /> </Grid.RowDefinitions> <StackPanel Orientation="Vertical" Name="MainContent" Grid.Row="1" Grid.Column="1"> <ContentPresenter Content="{TemplateBinding Content}"/> </StackPanel> <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center&qu

Can't find resource dictionary


I'm using VS2010, .net 4, in a pure WPF app. I'm using the code here to customize an expander control


I've put the code in a separate xaml file (/Styles/ScreenStyles.xaml) and included it via my app.xaml file using a merged dictionary

<Application x:Class="WpfApplication1.App"

Cannot find either Column "dbo" or the user-defined function or aggregate "dbo.GetCandiateID", or th



Good morning to everybody. I am not understanding why I am getting the following error (also mentioned in the subject line).

I have written the following function in SQL Server 2005:

    declare @candidate_id int
    SELECT @candidate_id = max(c.candidate_id) from dbo.candidates c
    if(@candidate_id is null)
        set @candidate_id = 1001
        set @candidate_id = @candidate_id + 1
    return @candidate_id

The function compiled properly. I have used the above function like below in the query:

select dbo.GetCandidateID()

I am getting the following error:

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.GetCandidateID", or the name is ambiguous

I can't find System.Xaml in framework 3.5



I install vs2010 first in my system , and i used vs2010 to build one solution create by vs 2008 which was build and run very well, but there are some error. and days  later, i install vs 2008, try to rebuilt it using vs 2008, but it warms that System.Xaml was missing, I can only find a image in the folder of framework 4.0, and can't find one in the folder 3.5. I try to add reference path of 4.0 to projects, but just got more warns and the solution can be built through.

How can solve this issue?



Why is the WPF/XAML Designer in VS2010 unable to resolve my StaticResource references?

I have a WPF 3.5 app that was rendering properly in both the VS2008 Designer and at runtime. Since upgrading to VS2010, the Designer is no longer able to resolve any of my StaticResource references. Everything still renders correctly at runtime.

How to find Resource Deadlock on the database / server?


How to find Resource Deadlock on the database / server?please help me...



i am using sql server 2008 and my jobs fail due to deadlock so i want to capture the root cause.please help me

Is it possible to bind a xaml control's image source directly from the resource file ?


Hi all


Is it possible to bind a xaml control's image source directly from the resource file ?




Where can I Find Free PHP Resource?


  I have seen a lot of people asking for sites that can free download PHP script .I have the same problem

Thanks for your help!

iPad converterformac|| ipdfconverter

syntax to specify subobject collection as xaml resource


Sorry for the vague subject title.

A UserControl has an ObservableCollection

the UserControl is instantiated in MainWindow.xaml

I want to specify the collection defined within the usercontrol as a resource in MainWindow.xaml

I thought the syntax might be like the following


<local:myUserControl.MyCollection x:key="whatever"/>


However this produces an error "The attachable property 'MyCollection' was not found in type 'myUserControl'




What's new in XAML of .NET 4.0

With .NET 4.0 Microsoft will bring up a improved version of XAML. This arcitle shows you the language enhancements they made.
Easy Object References with {x:Reference}

Built-in Types

Generics in XAML with x:TypeArguments

Support for Arbitrary Dictionary Keys

Use of Non-Default Constructors with x:Arguments

Use of Static Factory Methods with x:FactoryMethod

User Defined Functions in Microsoft SQL Server

User Defined Functions are compact pieces of Transact SQL code, which can accept parameters, and return either a value, or a table. They are saved as individual work units, and are created using standard SQL commands. Data transformation and reference value retrieval are common uses for functions. LEFT, the built in function for getting the left part of a string, and GETDATE, used for obtaining the current date and time, are two examples of function use. User Defined Functions enable the developer or DBA to create functions of their own, and save them inside SQL Server.

find a Control inside a GridView using jQuery


I have databound GridView in my page and I have a hidden DIV in all rows. Each row contains a Button that I want it to make the DIV visible for me! how can I use that with jQuery?!

here is the code page: 

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                EnableModelValidation="True" GridLines="None" ShowHeader="False" Width="100%">

Printing resource files



I have some resource files for localization and would like to print them. When I try to print them in Visual Studio (with File -> Print...) the button is disabled. Does anyone know how to print them? (Without copying each into word or excel)

Thanks and regards,

Is there any way to find out the reason for session expiry?


Dear All,

is there any way to find out the reason for session expiry?



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