|
Glad you got it sorted. Thanks for the info too.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Looking into my trusty (almost crusty) textbook "Programming WPF" by Sells and Griffiths, I came across this piece of code that sets up a menu:
WindowMenu.Items.Clear()
foreach (Window window in Application.Current.Windows) {
MenuItem item = new MenuItem();
Item.Header = window.Title;
Item.Click += windowMenuItem_Click;
Item.Tag = window;
Item.IsChecked = window.IsAcitve;
Item.windowMenu.Items.Add(item);
}
Note, the use of window.IsActive.
|
|
|
|
|
Nice snippet. Thanks for letting me know about it.
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
Hi,
When I want to create a Silverlight Application(.Net "Orcas"), there was an error appeared.
Creating project failed.
The imported project "C:\Program Files\MsBuild\Microsoft\VisualStudio\v9.0\Silverlight\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <import> declaration is correct,and that the file exists on disk.
How to solve the problem above?
Thank you.
Regards,
Katelva
|
|
|
|
|
Hello Katelva,
This version that you refered is old version. You should install Silverlight 2 and Blend 2.5. You can get all required installer from this link[^].
If you are facing some problems in installation, please read this post[^].
Hope it help.
|
|
|
|
|
Hi All,
Hope we're all well.
I've run into a bit of an issue that I'm hoping some here might be able to help with. After reading this article:
http://www.codeproject.com/KB/WPF/wpfskins.aspx[^]
I set about creating some themes for an application I'm working on. All works fine if the style code held in xaml is in one file. As soon as you have a dictionary in a source .dll that is a 'merged dictionary' the host application says that it can't find the merged dictionaries. Does anyone have any ideas?
I've tried the various methods for loading the external skin provided in the CP article source but always with the same results. It finds the 'parent' xaml dictionary and complains about not finding the 'child' xaml files ...
The Exception created is a TargetInvocationException on:
"{"Cannot locate resource 'defaulttheme_basecontrols.xaml'."}"
Could it possibly be an AssemblyInfo problem? I currently have this in the theme .dll:
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
I'm going to have a read up about the ThemeInfo stuff now.
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
I have gotten this all working now.
Rather than having the following in the <SkinName>.dll:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="DefaultTheme_Controls.xaml" />
</ResourceDictionary.MergedDictionaries>
It needs to be:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/<SkinName>;component/DefaultTheme_Controls.xaml" />
</ResourceDictionary.MergedDictionaries>
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
OK - I should have refreshed the section before I answered otherwise I would have seen you'd already sussed it. Well, have a 5 for yourself.
|
|
|
|
|
heh heh ... cheers fella!
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Have you supplied the fully qualified assembly name where the XAML resides. For instance:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Assembly1;component/childResource.xaml" />
</ResourceDictionary.MergedDictionaries> We had this problem before.
|
|
|
|
|
Have a 5 backatcha!
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Jammer wrote: Have a 5 backatcha
Why thank you sir.
|
|
|
|
|
|
How does this apply to WPF?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I just provided the link to what I thought might be a tool that CP members might find interesting. If this tool misrepresenting what it purports to be, then, tell the authors of it via the link I gave.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hello All,
I would like to add Card View feature in the grid for WPF.
I am using Infragistics XAMDataGrid.
Please suggest how to include this feature of Card View for the Grid,if anyone has encountered the same.
Regards,
Suchi
|
|
|
|
|
What is Card View? Can you post an image to look at?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hello,
I just downloaded Woodgrove Finance Application from this link[^]
I have VS 2008 Team System and am on Windows Xp. I extracted the application and opened it in VS 2008. But not working. I got some errors. When I take a look the details, the project is not able to find the assembly called WoodgroveFinanceHost.
xmlns:WoodgroveFinanceHost ="clr-namespace:WoodgroveFinanceHost;assembly=WoodgroveFinanceHost"
I have checked the assembly and I found that it's already there. Anyway, I tried to remove and re-add the WoodgroveFinanceHost project from WoodgroveFinanceApplication...
but not working. WoodgroveFinanceApplication is still not able to find the WoodgroveFinanceHost ..
Any idea?
Thanks in advance.
|
|
|
|
|
According to this article[^], I tried the following things too..
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:YourProjectNamespace"
But doesn't work..
|
|
|
|
|
I'm using the 3.5 sp1 beta, this is supposed to have better error messages and that seems to be the case:
Part URI cannot start with two forward slashes. Error at object 'PortfolioDataSource' in markup file 'WoodgroveFinanceHost;component/stockhost.xaml' Line 287 Position 74.
If you change it to pack://application:,,,/FinanceExplorer/Equity.xml it should work.
|
|
|
|
|
Insincere Dave wrote: If you change it to pack://application:,,,/FinanceExplorer/Equity.xml it should work.
Thank you very much, buddy.
I have checked the path in StockHost.xaml. I found the following code that seems correct.
<xmldataprovider x:key="PortfolioDataSource" d:isdatasource="True" source="pack://application:,,,//FinanceExplorer//Equity.xml">
I'm not sure whether you have VS 2008 or not. If you have, please try the following steps..
1) Download the application.
2) Extract it
3) Open it in VS 2008.
4) Go to Solution Explorer.
5) Double-click to open Page1.xaml. (You will get 2 errors at designtime)
6) Double-click StockHost.xaml.(You will get 11 errors at designtime)
If you close those files (e.g Page1.xaml or StockHost.xaml), those errors will be disappeared. Any idea why it's happening like that?
And, Like I said above, the path seems correct... Can you tell me how to change?
|
|
|
|
|
You need to change pack://application:,,,//FinanceExplorer//Equity.xml to pack://application:,,,/FinanceExplorer/Equity.xml
Notice the double slashes in the original.
I didn't get any errors, however the .NET 3.5 SP1 Beta did cause problems for the VS designer.
That single change in StockHost.xaml did allow me to compile and run the sample, it didn't work beforehand.
|
|
|
|
|
|
Hi All,
I'm using XP SP2, MSVS2008, Firefox verison 2.0 and IE6.
I created a C# WPFBrowserApplication and placed an image control in it with source given as "E:\WPF\WPFBrowserApplication2\images\imag.jpg".
When I run the application I'm getting exception :
XAMLParserException was unhandled: Cannot create instance of 'Page1' defined in assembly 'WpfBrowserApplication2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Page1.xaml'.
The same exception occurs if do the code behind for image as below:
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new Uri("file://E:/WPF/WPFBrowserApplication2/images/img.jpg");
bmp.DecodePixelWidth = 200;
bmp.EndInit();
Image img = new Image();
img.Width = 200;
img.Source = bmp;
I'm getting the exception when bmp.EndInit() is executed.
In windows application, the image is loaded if image control is used.Otherwise there is no exception, but image is not loaded.
(I've written the code in function Page_Loaded/Window_Loaded)
How do I load image in WPFBrowserApplication and WPFApplication without using image control?
Thanks & Regards,
Sanju.
|
|
|
|
|
Hi friends,
Can u please help me , i am unable to access the textbox(which in silver light application) value in .aspx page.
can u please help me how to get textbox(which in silver light application) value
Regards
Kishore
|
|
|
|