|
Have you tried anything along these lines?
this.Topmost ???
This is a dependency property ...
Also I this you might be able to do something like this via the application class ... sorry I've never had to do anything like this.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Hmmm, I guess I could use that one in some way - I ended up going a different route though.
But thanks for the reply - appreciated.
"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
|
|
|
|
|
Which included doing what? Would be good to know what you found ...
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Well I did something entirely different.
The problem was that my program (an image processing application) may open a lot of windows in the course of a run, and when the user chooses some action from the menu/tool bar it should only affect the top most window owned by the main window.
So what I did instead was to handle the child window's Activated event. In the event handler I then simply saved a reference to the window in the main window. That way I could simply call mainWindow.ActiveWindow to get the top most child window.
Basically my problem is that I need some kind of pseudo MDI which WPF does not support - but this works quite nicely.
"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
|
|
|
|
|
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?
|
|
|
|