|
I used the WPF ellipse in my program.
When I clicked on the ellipse, there will be blue dots appearing around it.
Why? How can I get rid of them?
|
|
|
|
|
The dot's are called a focus rectangle. To get rid of them you need to set the FocusVisualStyle to null for the particular button. You can do this like this:
<Button Content="..." FocusVisualStyle="{x:Null}" /> If you don't want the focus rectangle on any button, you'd define a global style for all buttons and set it there.
"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
|
|
|
|
|
Thanks a lot!
|
|
|
|
|
You're welcome.
"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
|
|
|
|
|
was going to suggest getting an ointment or something...
|
|
|
|
|
Hi Everyone,
I am developing a web site that will be commercial but i want a really nice look and feel it. What will be the best to use? Is WPF a good approach? If so where may I find good look and feel of existing web sites to show to my customer? How easy is it to maintain?
I also heard that search engines are capable of getting all keywords if you use Silverlight/WPF. How true is that and would you recommend WPF?
Thanks
Chris
|
|
|
|
|
Chris
WPF is primarily a desktop application framework. Yes, you can deploy BAML application, but they only run on Windows. The web development area that uses XAML (the markup behind WPF) is Silverlight. Yes, Silverlight is SEO "friendly", so that's probably what you are looking for.
"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
|
|
|
|
|
WPF mostly used to develop the desktop application.
i think you shoud use the ASP.NET+SQLServer+Ajax,if you want it to be more attractive,using the Silverlight~~
|
|
|
|
|
Hi,
i need a kind of impression. What tool enables me to create a WPF Form containing a lets say dark blue background. On top of this background there should be a circle shape consisting of 12 Segements. Each segment should be like aero glass but colored. Each segment should have a different color.
How can i create such ?
Any info is appreciated.
|
|
|
|
|
Sounds like you need a pie chart (available from the WPF Toolkit library 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
|
|
|
|
|
Hi,
I am working on Silverlight project. In this I need to access a control in the tabcontrol in ManPage.xaml from another usercontrol which is placed on the MainPage dynamically. For accessing this we should not create object to the MainPage.xaml such that we no property or currentstate on the MainPage.xaml page control's state will not change.
If anyone have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
Hey guys,
I am using a WPF control in a library to generate a graphic and save that graphic with RenderTargetBitmap to a png file.
To generate the control-object, I use the new-operator. After setting some properties (background, with, height), I call BeginInit().
Then I am setting some properties, which set properties of the control within the usercontrol (the control in the usercontrol is a Chart-control of the WPF Toolkit). After setting the properties of the usercontrol, I am calling EndInit().
Before I use RenderTargetBitmap, I am calling Measure and then Arrange. This seems to render my user control, but the chart control within the user control seems not to update.
How do I force updating the control within the user control?
Post every idea you have.
Tell me, if you need some source code or more details.
Thank you!!!!
|
|
|
|
|
I found the solution.
I placed this inside my user control and call it before using the RenderTargetBitmap.
this.Measure(new Size(this.Width, this.Height));
this.Arrange(new Rect(new Size(this.Width, this.Height)));
BubbleChart.UpdateLayout();
|
|
|
|
|
Hi everyone, i wanted to know if someone here knows where could i find some tutorials to accomplish the following:
I want to make a silverlight app that shows in a main screen a pictures of a room, let´s say a living room, and i want to have a small menu at the left with a scroll bar with different things in it(different lamps, flowers, candels, etc.) and what i want to do is to drag and drop the desired element and place it into the main picture (living room).
Im pretty much a newbie so any tutorial that you can point at will be really usefull.
Thanks in advanced.
modified 6-Apr-22 21:01pm.
|
|
|
|
|
|
Hi guys!
Is there a chance to find out, whether a button was right or left clicked by using commands?
What I would like to do is add to commands to a button, one for left click and one for right click.
Thanks in advance!
|
|
|
|
|
You can add a MouseBinding(or MouseGesture).
Something like this,
<MouseBinding Gesture="LeftClick"
Command="ApplicationCommands.Open" />
MouseBinding needs the Mouse action and the routed command to be executed. You will have to add another MouseBinding for Right-click and also change the Command value to the routed command to be executed in your case.
For more details, see here[^], here[^] and here[^]
|
|
|
|
|
|
I have done something like that before. I put it in a custom control since the basic button class does not seem to provide such functionality.
Hmmmm... sounds like an article that should be written...
|
|
|
|
|
You can do it with a MouseBinding. Did you see my suggestion[^] ?
|
|
|
|
|
I did not see your reply until after I posted mine (nor did I consider the possibility of putting input bindings on individual controls instead of the window). Since I already have a solution working, I think I will stick with it. Plus, I prefer to write this:
<TextBlock controls:DualCommandProvider.LeftClickCommand="Open"
controls:DualCommandProvider.RightClickCommand="Close" />
instead of this:
<TextBlock>
<TextBlock.InputBindings>
<MouseBinding Command="Open" MouseAction="LeftClick" />
<MouseBinding Command="Close" MouseAction="RightClick" />
</TextBlock.InputBindings>
</TextBlock>
Especially since where I am using this, I am putting left and right click actions on many controls and the extra lines would make the flow of the design harder to follow.
|
|
|
|
|
I have a different opinion though. I feel separating it into a different section would make it easier to follow. It would demarcate the properties and bindings into separate group instead of all of them being together. It looks neat with just two entries but I would go crazy when the properties/bindings set through XAML would increase and make the node look ugly.
This method has the obvious advantages of inherent implementation and access to all Mouse gestures in addition to the left and right click.
But hey, as you feel comfortable. Cheers
|
|
|
|
|
Hi.
I have a wpf app that have a stack panel that i would like to populate
with images that i'm downloading from a website.
to avoid getting the UI from freezing while downloading the images i created another thread and in that thread downloaded the images and tried to create the image controls. but i'm getting this exception:
"The calling thread must be STA, because many UI components require this."
Here is the thread code:
<br />
new Thread(delegate()<br />
{<br />
string searchUrl = siteAlgorithm.BuildSearchExpression(searchKeyWords);<br />
searcherObj.Clear();<br />
searcherObj.LoadNewPage(siteAlgorithm.ExtractSearchResults(myWebClient.DownloadSiteToString(searchUrl)));<br />
<br />
MemoryStream stream;<br />
Image img = new Image();
System.Windows.Media.Imaging.BitmapImage bitImg;<br />
foreach (SearchResult item in searcherObj.FirstPage.resultItems)<br />
{<br />
stream = new MemoryStream(myWebClient.DownloadData(item.imageUrl));<br />
<br />
bitImg = new System.Windows.Media.Imaging.BitmapImage();<br />
bitImg.BeginInit();<br />
bitImg.StreamSource = stream;<br />
bitImg.EndInit();<br />
img.Source = bitImg;<br />
<br />
Gui.AddSearchResultItem(img, item.info, item.uri);<br />
}<br />
}<br />
).Start();<br />
|
|
|
|
|
You can't create controls from another thread. You CAN use the background worker class to download them, and it's work finished delegate runs on the main thread, as does the progress event, so you can use those to put your image into your page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
I want to create a simple form contains two combobox and a button.
1.ComboBox 1: Select which program the client wants to join.
2.ComboBox 2: Select which group of client will join the program
3.Button 1: When Clicked, I need find all the client in that selected group then insert into Join table.
I want to know how to write that custom method to insert all those entries.
Any example which I can study and learn to fulfill my goal?
Thanks.
|
|
|
|