|
Hi Pete,
Not sure what you mean here. Do you mean the look and feel expectations or functionality or both together?
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
It's a bit of both. The themes issue relates to what they expect to see - the expectations relates to the interaction they expect from the dialogs.
|
|
|
|
|
Sure that makes complete sense. At the moment I have a nice little dialog that just does what I need it too at the moment ... nothing fancy but its got all the same theme as my app.
It needs expanding on before the final release for sure. I'm also not even allowing browsing to random folders at the moment its just locked into offering file names at the moment. That needs attention for the final release.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
It's fair enough to redo or change an implementation if what you are after is sufficiently different to the behaviour of a standard dialog.
|
|
|
|
|
Well ya got me there ... at the moment its really not doing anything remotely different.
Guess I'll just have to make something up!
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Hello,
is there a way to Bind a image to a window? I have a button in my application which has a image,
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Image Source="c:\IMG_1861.JPG" Width="200" />
</Window>
Resizing the window does not resize the image, instead it streches and crumbles the image. Is there a way to get away from this? Yes we can draw the Image using WPF that seem to be tedious as far as my application is corncerned, i tried using ViewBox is that the only way out?
Sample application apreciated.
With Rgds,
Anil
|
|
|
|
|
I'm not quite sure what you mean by crumbles the image, but if you don't specify the width it will take up the available space.
Maybe the Stretch and MaxWidth properties can give you the behavior you want.
|
|
|
|
|
The problem that you have is that this is a bitmapped image and not a vector image. If you want an image that scales well, it has to be a vector graphic because a vector graphic uses maths to manage the implementation of the image. When you resize your bitmapped image, it only has so much information to work with, so the image degrades once it is manipulated away from its usual dimensions.
I'm afraid a ViewBox won't help you get round the limitations of your jpeg file.
|
|
|
|
|
Yes thats my problem. I need to convert the bitmap image to Vector graphics. This can be done using Adobe Illustrator using XAML plugin.
Thanks Anil
|
|
|
|
|
AnilUnni wrote: This can be done using Adobe Illustrator using XAML plugin
That's interesting. I didn't know that Illustrator could do that.
|
|
|
|
|
Pete,
Illustrator has a plug-in to export vector images and scenes to xaml. It works great.
The converting of bitmpat images to vector article is a done by tracing, I have not seen one yet that does a great job on complex photos.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl Shifflett wrote: Illustrator has a plug-in to export vector images and scenes to xaml. It works great.
Nice, although we are using Expression for our artwork (and looking into Zam3D based on Jammer's recommendation).
|
|
|
|
|
There are also utility apps for PSD - XAML converting, I've had limited success using this one here though as it can't handle complex PSD's. There are quite a few things potentially in a PSD that just don't map to any equivilent in XAML or WPF.
I've been working with ZAM3D some more ... I'm even more impressed with it now than when I recommended it!!! I've had a few crashes which is unfortunate but to be expected with a v1 app I guess ...
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Hi All,
Does anyone have any tips on tracking down hard to find problems in XAML?
My application runs without any hitches and everything works as designed.
Blend opens the solution and displays the main window with out any errors or problems building the solution.
But VS2008 wont show the main screen in its XAML designer pane and says that there is an un-handled exception "Object reference not set to an instance of an object." I've seen this error and solved it before but the exception track trace gives no clue as to the source of the exception.
Thanks,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Jammer,
1. build often so that things don't creep in.
2. I've seen this too. Blend likes this, VS doesn't. Also in the reverse.
3. To find your problem, open in VS and remove sections one at a time until the offending section is discovered. Then, go look at the constructors for code and controls in the offending section. You really need to watch code in your constructors as if it blows up, you get "REAL" misleading exception messages.
Hope this helps.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Yeah, i builld really often ... in fact almost constantly as I'm still really feeling my way around .NET in general.
I have a couple of ideas as to what might be doing it ... I need to investigate these. I think your idea of removing sections (do you mean controls and use controls?) will be a good one ...
Do you know of any plans by the WPF team to tighten the grip on XAML exceptions like this? I was chatting to another Developer at work today (a contractor) and he was expressing similar feelings about how difficult it can be to track down XAML problems.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Jammer wrote: Do you know of any plans by the WPF team to tighten the grip on XAML exceptions
Have not heard of any specific rumblings, which is why I build often and learn the do's and don'ts. Comes with time, you'll get it all sorted out.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
For sure ... nothing beats experience.
I have my data loading and saving via my custom dialog now ... all looking very WPF and spanky new sparkly nice ...
Just trying to find out where the Serialization exceptions live now ...
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Unfortunately, the issue with the designer pane reporting an unhandled exception is consistent with the behaviour of the old WinForms designer. The problem actually relates to the designer having to "compile and interpret" the item in the designer, and some things just go wrong. I usually find that attempting a clean rebuild is a good idea in order to find issues.
|
|
|
|
|
Hi Pete,
A clean rebuild? Do you mean run a "Clean Solution" and then rebuild/recompile?
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Jammer wrote:
A clean rebuild? Do you mean run a "Clean Solution" and then rebuild/recompile?
I certainly do.
|
|
|
|
|
Feck ... that didn't help at all. I need to sit down with more time for tackling this one.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
So I got inspired at work to learn WPF and Xaml. Cool technologies indeed, especially the data template stuff!
Anyway, I've been playing around with the TreeView control. I've successfully bound it to my data structure using the HierarchicalDataTemplate element. Now to my question: how do I propagate changes in my data to the control? Resetting the DataContext property to my data didn't do anything at all (which was expected - same reference being used!).
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
If you bind to an Observeable collection your changes will automatically be displayed.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Thanks! I will try it as soon as I get home.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|