|
Thanks so much! That fixed it.
See, Expression Blend generated: "#Arial". Once I wrote "Arial", like you suggested, it worked.
Thanks again.
|
|
|
|
|
You're welcome
|
|
|
|
|
Hey experts .
I've created several Grid in my App.
<Grid x:Name="GridShanbe0">
.
.
.
</Grid>
Then I've created a style in App.xaml file for all of them :
<Style TargetType="{x:Type Grid}">
<EventSetter Event="UIElement.MouseLeftButtonDown" Handler="Grid_MouseLeftButtonDown" />
</Style>
But whenever I'm gonna compile the App, this error has occurred
'WPF.App' does not contain a definition for 'Grid_MouseLeftButtonDown' and no
extension method 'Grid_MouseLeftButtonDown' accepting a first argument of type
'WPF.App' could be found (are you missing a using directive or an assembly reference?)
I'm sure I've created Grid_MouseLeftButtonDown method.
What's wrong ?
Thank you
|
|
|
|
|
Mohammad Dayyan wrote: I'm sure I've created Grid_MouseLeftButtonDown method.
But where have you created it? I seriously doubt it's in App.xaml - and that's what the error is telling you, it's looking there for this handler.
|
|
|
|
|
I've created it in Window1.xaml.cs file.
Pete O'Hanlon wrote: it's looking there for this handler.
Thus, must I write the style in App.xaml ?
|
|
|
|
|
Mohammad Dayyan wrote: Then I've created a style in App.xaml file for all of them :
As Pete said, you've got the Style in App.xaml.
Try putting the Style and code in Window1.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Thus , when we're gonna create EventSetter, we must put it in the same file with the element.
Is it true ?
|
|
|
|
|
|
On application start i am launching 4 exe (app Domain).
ALL 4 exe will load and cache data from db to memory.
Data size is huge.
I want to share this memory among all fore application.
Thanks
hiren shah
|
|
|
|
|
This question doesn't seem to have anything to do with WPF, WCF or WF, so you shouldn't post it in this section. Saying that, I'm feeling in a nice mood so I'll answer this for you. What you can do is create a memory mapped file and use this - this[^] article is a good place to get information on how to do this.
|
|
|
|
|
I've an image which is 2 dimensional. I want the image should become 3 dimensional. And that should be rotatable? Can any one help me in this concept?
|
|
|
|
|
The answer to this depends on what you mean by making a 2D image 3D. Strictly speaking, in most cases you can't do this automatically (the obvious exception here being converting a bitmap to a terrain using heightmaps), but you could use a modelling tool such as 3DS Max, Maya, Cinema 4D or Zam3D to create a 3D representation of your image.
Once you have the model created, rotating it is fairly simple. This[^] article should really help you.
|
|
|
|
|
You can use this XAML for rotating a Grid.
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="-6"/><!-- by changing this property you can rotate the Grid -->
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</Grid.RenderTransform>
Thus you can write it for an image.
|
|
|
|
|
Hai All
In my silverlight application i am using calendar control , in that if i select a date which have any datas for the particular date ,the color of that date should be changed , how to change the color plz help me
|
|
|
|
|
You can specify your own style in resource. Please let me know if you are still having this problem..
|
|
|
|
|
can you please tell me how the code to do this?
|
|
|
|
|
hi guys
i get the following while creating my wcf instance in my code
"ConfigUnrecognizedElement"
.
any solution or any other reason .
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
What do you mean by "my wcf instance"? Are you using Silverlight-enabled WCF service?
|
|
|
|
|
Hi
I need to use the Win forms Report Viewer control in a WPF application. I believe that I need to use the WindowsFormsHost control in the WPF application to host the report viewer. Also this would have to be done programmatically.
I have tried the solution on this post but the code does not compile. Not sure if anything is missing.
http://social.microsoft.com/Forums/en-US/vsreportcontrols/thread/4d31a7a3-0b85-4294-888a-fc1206abe08a
Has anyone had a chance to work on this?
Thanks
Nakul Ringshia
|
|
|
|
|
Nakul,
What I've always done, is add a WinForm Window to my project and when the WPF code launches any report, is to Show the WinForm window with the report viewer control. Just pass whatever report information is necessary.
This way, when the Report View Control works in WPF, you just replace the window with the same name.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Ramble
I've been looking at using the View-ViewModel-Model pattern in WPF & Siverlight for some small apps.
Often I find the ViewModel is very similar to the Model in my simple apps, but maybe just a few more view specific properties.
Wrapping my Model class in a ViewModel is sometimes problematic.
Say we have an Employee Class and we want to add a IsSelected property so it can be used in the View.
If we create a ViewModel Employee class and add the new IsSelected property all is okay, except....
If any other class, say Company.GetEmployees() returns a List<employee>, then I have to write another wrap to enumerate through the results and transform Employee to ViewModelEmployee.
Possible solution?
Use Extension Methods (don't have Extension Properties)
Then I can just add GetIsSelected, SetIsSelected methods to the base Employee class.
Using an ObjectDataProvider (don't think this is in Silverlight) we can access the GetIsSelected method, using Bindings similar to properties.
At least that's what I'm thinking haven't tried this out yet!
/Ramble
|
|
|
|
|
|
Great answer Karl. Like it.
|
|
|
|
|
|
I've got a class library in which I added a service reference to a WCF service. VS automatically added an app.config file into the class lib which is fine with me.
Unfortunately, I always get the following error trying to use the service reference:
"Could not find default endpoint element that references contract 'ServiceReference1.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."
I've checked all the configuration the endpoint settings are well aligned with the auto generated proxy for the service.
I noticed that if I add the same service reference into a web app and copy the serviceModel config over it just works fine in my web app. So that's why I assumed that there must be some issues with the class lib in conjunction with wcf references?
Am I wrong?
Any help very much appreciated!
Cheers,
M
|
|
|
|