Why is the binding icon (a small gray icon) not visible in blend for some properties even though they are DependencyProperties? For eg. I dragged a button on my page and dragged a textbox. I want to bind button's content property to textbox's text property. But i can't find the Binding icon in Blend. I know if i type the binding syntax in code it will work just fine. But why is that icon missing?
Thanks in advance :)
I tried reproducing this, but for me, the "Advanced Options" -> "Data Binding" is there. I'm using Blend 4, what version are you using?
Related
Im trying to edit a BorderBrush (edit: or indeed any element that requires color picker) in the VS2012 Properties pane.
After selecting the border element in the MainWindow I select Brush > BorderBrush >Solid color brush in the property pane.
There is a yellow border around the Color Picker and RGBA values and im not able to change anything in the editor, I can enter values fine into the MainWindow Element XAML ie BorderBrush="#FF777777" I just cant set them with the property editor!
What can I do to get the editor working?
The only solution I have found to date is to re-start VS2012.
In VS2015 exists button "Disable project code" above XAML Editor (Zoom, Rendering effect, Show snap grid, ..., Disable project code). This help me
I have seen this post: WPF ComboBox: background color when disabled
and some others...
But This solution causes me some problems. All I want is to make the textBox gray, and the ComboBoxItems gray and not selectable. I don't want to recreate all the style as the control won't work properly on both XP and seven. I don't want to choose one style for both, but I want XP style for XP and seven style for seven.
Is there a way to set the style so I can change the Background of the ComboBoxItems when the comboBox is Readonly?
Thanks in advance!
Update: It seems that the Drop down popup should be restyled instead. I got to find how.
I finally found my answer at many places on the web, pieces by pieces. The ComboBox style is composed of other controls. The PopUp is the one that interests me. It is not public, so I can't modify it as I want. It would have been interesting to define a style for my popup and to replace the original popup by it, but it is not accessible, so... I attempted to make a template that inherits from the template of the original ComboBox, but that is not possible neither. It won't accept inheritance for some good reasons How to Inherit a Control Template. So the template must be remade totally or not. The other option would be to make my own control that inherits from combobox and that changes the items to gray and not selectable when the combobox is readonly (into the code), but this is not a good idea in my situation. No solution for me. I will have to stick with the whole template redifinition. I hope this post will help someone in some way!
Can the width of the dropdown be set to a different value than the AutoCompleteBox itself?
The Popup is a separate Part of the AutoCompleteBox, so it should be possible to extend that beyond the width of the text box.
In Blend, right-click on the AutoCompleteBox and select Edit Template > Edit a Copy, giving the new template a name.
Drill-down in the Objects and Timeline window to the 'Popup' part, and beneath that is a Grid. Change the width of that Grid to change the width of the popup content whilst maintaining the current width of the text box).
(I must admit I've only had chance to do this in Silverlight Spy, but it definitely works there so I can't see it being a problem doing it through Blend).
If you are not using Blend, just copy Default Style and Template of AutocompleteBox from MSDN and paste it into your App.xaml file (here is little tutorial on how to handle styles in app.xaml).
You can then modify that pasted style or template.
I did some searching but it wasn't what I was looking for. So, does anyone know a way how to style the validation tooltip in Silverlight(the thing in the green border)?
alt text http://img689.imageshack.us/img689/222/validationtooltip.png
Any help would be greatly appreciated!
Best Regards,
~K
Unfortunately you can't easily provide a style for the validation tooltip without effectively styling the entire Textbox control. Blend makes this fairly easy if you are familiar with using that design tool. However if your a dyed in the wool coder like me then...
Goto this page on MSDN TextBox Styles and Templates
Copy the vsm namespace alias to your UserControl xaml
Copy the TextBox style into UserControls.Resources give it at an x:Key name (say MyTextBoxStyle")
Copy the ValidationToolTipTemplate from the web page to the UserControls.Resources, paste it above the TextBox style. It already has an x:Key name that the TextBox style will be referencing.
Add Style="{StaticResource MyTextBoxStyle}" to your TextBox in the data grid.
Now you play around with the validation elements of the templates to get your desired result.
The validation messages are displayed as a visual state. you can get to these (and edit them) as templates directly from blend.
I'm having some issues trying to change the look / style of a combo box in Expression Blend / WPF. While there are tutorials out there describing setting styles for buttons, there seem to be a few wrinkles with ComboBox controls.
Can anyone offer any advice, or point me towards good tutorials that cover re-styling something more complex than a button?
The ComboBox style template has 3 parts to it.
The ContentPresenter you should have come across styling Buttons.
There is a Part_Popup that you should find easy to change properties on and style.
The last part is a ToggleButton, to style that you need to "edit a copy" again and create another new style template for the ToggleButton.
Have a look at BeaCostas SolarSytem Listbox it's a lovely piece of work.