|
I tried that, and it still doesn't work.
Grrrr...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I'm sorry, I've spoken to Nish and we agree that this is the solution. The dependency properties give higher priority to the storyboard than a manual property. However, we don't have to do that in our code base anymore, so I can't find an example. I'm sorry I can't help more, it's my recollection we set a property to null on the storyboard to release the property from it, but I can't figure out what it was.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Well, I tried this:
Storyboard.SetTarget(MyAnimator, null);
And it still doesn't have any effect.
I also tried setting the TargetName and TargetProperty to null , but the framework won't even allow me to do that.
I also set the FillBehaviour to Stop , and that also had no effect.
No matter what I do, if I animate the re-size and then try to set it for non-animated re-sizing, the animated control will NOT let me programatically change the Height property.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
There doesn't appear to be a tab item Activated event of any description. The only thing I've found that fires when a tab item is selected is the Loaded event, which is kinda - well - baffling. Am I missing something?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
No you're not, and there is a reason why it behaves this way. It's not a great reason, but it is a reason. Basically, there's only one ContentPresenter showing the contents of the selected tab. This means that the visuals are loaded "on the fly".
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
You're right - it's not a good reason. I've now got to monitor whether or not the tab is being created when the Loaded event is fired. It's starting to look like I have create an event myself, just to keep the chaos in the code to a frakking minimum.
What a pile of crap...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
The TabControl has a SelectionChanged event that seems to fire every time a tab is selected. In that event you can get the new selection as TabControl.SelectedItem.
|
|
|
|
|
I don't need the tab control to know what tab item was selected. I need *the tab item* to know it's been selected.
At this point, I'm reacting to the Loaded event (which is a two-bit hack work-around).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Depending on what you are doing when the tab is selected (my psychic assistance is currently offline), I can think of two approaches. The first is to use a style with a trigger on the IsSelected property. The other approach would be to sub-class TabItem and override the OnSelected method.
|
|
|
|
|
I Had the same problem and this was unfortunately the only solution I could think of.
private void TendererTabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
if (e.AddedItems[0].GetType().Name == "TabItem")
{
TabItem SelectedTab = (TabItem)e.AddedItems[0];
if (SelectedTab.Header.ToString() == "Tenderers")
{
.....
}
if (SelectedTab.Header.ToString() == "Contenders")
{
....
}
}
}
catch (IndexOutOfRangeException)
{
}
|
|
|
|
|
I have a bunch of .chm files which I added as resource files to my project, they're stored in a folder called Help.
I'm using the HelpProvider class as stated [here^] to load the appropriate help files when F1 is pressed.
Im my XAML I use the folling to specify the path to the help file:
h:HelpProvider.HelpString="mainscreen_help.chm"
But this only works when the help files are stored in the "bin" folder. How do I specify a path to the chm files stored in the Help subfolder?
Help/mainscreen_help.chm doesn't see, to work
|
|
|
|
|
First of all, you have copied the Help folder into the bin directory haven't you? You're using an app-relative path there, so the whole relationship has to be relative in the bin directory as well.
Secondly, and blowing my own trumpet a bit, there's a WPF based way to add help to your application descibed here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
No I haven't copied the Help folder to the bin folder, it's in the folder 2 folders back from the bin folder.
Shouldn't there just be a way to specify the path easily.
|
|
|
|
|
And the link you gave me still doesn't explain how to specify the path to a help file when it's located in a sub folder, it does exactly the same as the current class I'm using.
|
|
|
|
|
It would. Think about it for a second - when you deploy your application, the help folders are presumably going to exist somewhere under the directory where your executable resides. Hence, you have to replicate this in your application structure. WPF isn't magic, it can't know that you intend to deploy it differently; so copy your subfolder below the bin directory and mimic the live environment.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
How can i drag an item (list item) from its list and drop it outside the window and still handle the event?
Example: If i have a list controls which contains a list of filenames, then i drag 1 list item outside the main window and drop it, a message box is displayed which displays the filename.
I am planning to develop similar application which performs additional processes when an item is draged(and droped) outside the main window.
Please help.
|
|
|
|
|
yeah, I'm wondering that myself....I'm using an Adorner while DD-ing a listviewitem. Works great inside the app window....but I want to drop it on the desktop and perform some custom tasks there. No luck for now.
|
|
|
|
|
Hi,
I am working on WPF stack panel. In this I used to add items dynamically to the stack panel. Now If I click on the stackpanel item some message like the number of the child clicked should be displayed. Will there be any events for thi to checking the selected item of the stack panel.
If any one have any idea how to do this please reply me.
Thanks in advance
|
|
|
|
|
This might be somewhat complex.
Have a custom Routed event for the Canvas items.
Let the Canvas subscribe to this event.
The Canvas item fire's the routed event whenever it is selected.
When fired, the Canvas event handler gets invoked
In the handler, RoutedEventArgs parameter's OrignalSource property should give you the actual Canvas item that invoked the event.
|
|
|
|
|
Hi All,
I'm having a nightmare getting some XAML snippets adequately formatted for a new CP article. Anyone got any tips / working methods / tools that make this process easier?
Cheers,
|
|
|
|
|
I use Scrubber in MoXAML PowerToys[^] and the appropriate source language in the article template to accomplish this.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Nice ...
|
|
|
|
|
I like it. The next version of MoXAML has something called Babelcode - it converts from VB.NET to C#, and vice versa.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Now that will be a wicked addition to the tool set. I really must get VS Standard or Pro for me at home. I so miss MoXAML at home with C# Express.
|
|
|
|
|
Hi,
i have a UserControl (CustomToolbar) with buttons like new, delete, ...
Also i have a UserControl (Customer) with Textboxes, Labels, ...
My UserControl (Customer) looks like this:
<UserControl x:Class="test.ucCustomer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:mekoOffice">
<local:bDockPanel>
<local:ucCustomToolbar x:Name="tbCustomer" DockPanel.Dock="Top" />
<local:ucStatusbar x:Name="stMain" DockPanel.Dock="Bottom" />
<Grid x:Name="grdMain">
If i click on the button new in my toolbar the new-method in UserControl (Customer) should be fired. In another scenario if i click on the button new in my toolbar the new-method in UserControl (Article) should be fired. How can i accomplish that.
thx,
zauberfisch
|
|
|
|