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
Related
I am trying to bring the focus on the clicked item of the surface listbox. For WPF I had a similar post and it worked after setting the trigger property of .
The full xaml code is available at http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/5d486826-9a72-4769-bd09-ff6977e16c30/#cd2cd9af-abbf-40ca-9e30-4684ee2a2eb2
I tried doing the same in the xaml code for a surface button which is put as item in surface listbox, nothing happens. Basically, my listbox contains surface buttons and when any button is clicked, it scales up i.e. the size of it increases. The only issue is that next item overlaps the scaled item because of the z-order issue. For the normal WPF listbox and button control above code did the trick but its not happening for surface application.
Would appreciate any help/directions in this issue.
Got it working.. Had posted on MSDN and it finally worked by setting the zIndex of the surfaceListbox instead of the content of the item which was a surfacebutton.
http://social.msdn.microsoft.com/Forums/en-US/surfaceappdevelopment/thread/970877bd-2960-4f0e-a203-1d357bbd55ce/#4a08e54b-5055-4a66-ad75-762ee88ef303
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 have a WP7 panorama application that uses a dark image for the panorama's background. The issue is when the device is set to light theme. The issue root cause is the Focus state transition animation for the TextBox sets the background color to transparent.
Since my panorama is always dark I'd like my textbox to always be white background.
First attempt set textbox background to white.
FAIL: transition changes background back to transparent when textbox gets focus.
Next attempt programmatically set textbox background to white on gotfocus.
FAIL: transition changes background back to transparent when textbox gets focus.
Next attempt override control template and change transition.
FAIL: never could get this happy with WP7, not sure if I used right version
Next attempt override control template using Blend 4.
FAIL: might have missed something but every state looked correct.
I see where lots of others are having this same problem but no here's exactly what you need to do so you don't trip up some minor detail.
If you can help us with a solution please do share.
Here's what I tried with Blend 4.
Opened my project in Blend 4, selected my textbox, right-clicked on it, chose Edit Template, and then Edit a Copy.
Here's where I'm not exactly sure what I need to do.
I went to FocusStates, and selected Focused. What I see in the preview pane looks like what I want. A nice textbox with a white background.
I look on http://msdn.microsoft.com/en-us/library/cc645061%28v=vs.95%29.aspx and I see there is a storyboard animation for the various FocusStates and I figure in WP7 there must be one that makes textboxes have a transparent background when they have focus in the light theme.
My goal of making my textbox have a white background since I have a panorama with a dark background image has proven difficult to say the least.
You were on the right path with this retemplating the control in blend. You can control formating of each constituent component of the control and for each state.
If you're still having trouble with this, post your resulting xaml for the TextBox in your question once you've made the changes.
Re your edit: Focused -> Grid-EnabledBorder-Background uses static resource PhoneTextBoxEditBackgroundBrush. You can change this to a local value then choose your colour.
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?
Does anyone have any ideas on how I can remove the focus rectangle from a silverlight textbox? (I'm talking about the blue rectangle that appears when you click on the texblock to start typing)
I'm looking through the default style and template for the textbox but can't seem to figure out which element to tweak.
Thanks!
In the template you will find a border called FocusVisualElement. In the base and Unfocused Visual State it has an opacity of 0%. In the focused Visual state it has 100% opacity. You can simply delete the FocusVisualElement if you don't want any border indicating the focus.
This probably looks weird when the MouseOverBorder still appears so you might want to delete that too from the Template, however move the ContentElement it holds to the parent Grid first.
Alternatively you could set the Opacity to 0% for these borders in all states.