Why can't I make my button's width smaller? - winrt-xaml

I'm working on universal app. When I'm designing the view for Windows Phone 8.1 project, I can't make any button's width smaller than 109. If I set the button's width property to smaller than that, it becomes 109 when rendered.
I would like to know how to force the button to be smaller than that, and why does this limitation exists in the first place.
Thanks a lot for helping!

If you are just dragging the button from the Toolbox, it will set a MinWidth and MinHeight for you. You need to change these properties.
<Button MinWidth="25" MinHeight="50" />

Related

Adding button to layout and it will not show up

I'm adding a button to a linear layout and it does not show up. Main XML after adding button last button:
Preview button does not show:
I use AIDE as well, it isn't quite reliable. Nor is its Design preview. So, basically, if your codes are correct just build the app and see what happens.
There are no place for the third button.
Reduce string length in android:text of all buttons and check that button appears, or make linearlayout orientation vertical and check.
You must learn about "weight" attribute...

Vertical Radio Buttons

So what is the best method to get vertical radio buttons to display in situations with limited screen space. I started with the standard xp:radioGroup, but I can't control the format to be vertical.
I have tried the multicolumnradiobutton on OpenNTF, but I was having problems getting an eventHandler to fire to force a partial refresh (tried using onclick). Would love to see a sample of that since that would solve the issue of formatting.
What I am seeing at this point is if you use a radiobutton group you are stuck with a horizontal layout of buttons. I haven't looked Dojo Radio Button to see if it was the answer.
Basically best option for vertical list of radio buttons that will allow partialRefresh of document.
You get vertical radio buttons with xp:radioGroup when you set layout="pageDirection":
<xp:radioGroup
id="radioGroup1"
value="..."
layout="pageDirection">
...
</xp:radioGroup>
You can use a radio button (not a group) and tie them together with the name. Then you can format them any way you want. This is useful when using Bootstrap since the radio button group puts everything in a table.

Javascript JSColor not working on popup page

I used color picker to change color but it didn't work on popup window.
I have some html code which is dynamically added and i want to apply color to text. How i can apply color by using popup page?
The default zIndex of the JSColor popup is probably too small. Because of that the popup is not shown. Go into your jscolor.js file and change the zIndex to 9999
this.zIndex = 9999;
#Captuszz is correct that this is probably an issue with the popup's z-index being greater than jscolor's default z-index (1000).
Changing that default would be one possibility. An alternative would be to set the z-index for that particular jscolor instance via configuration:
<input class="jscolor {zIndex:9999}" value="ab2567">
The "right" z-index value just needs to be greater than the popup's, so I'd suggest looking at the popup's value and then adding 1. Jumping straight to the maximum possible value could end up being a problem later if something else needs to be even more foregrounded.
Also be aware that the jscolor popup isn't rendered within the popup div, so click events within the color picker count as "outside" the popup.

How to properly display a focus rectangle in a compact SplitView menu item

I'm building my first Universal Windows Platform (UWP) App and am trying to implement the popular "Hamburger Menu" using the SplitView class.
Inspired by many samples, the items hosted on the SplitView pane are re-styled RadioButton controls, with a vertical highlight-rectangle, an icon and a text. The appearance is similar to that of the Groove app.
I'm now trying to implement navigation and selection using the keyboard, and this now bring a little focus-rect around the items in the SplitView pane. However, since the pane clips its contents when its DisplayMode is either CompactInline or CompactOverlay, the focus rectangle is also clipped, which is not the behavior a user would expect.
Please, can anyone advise on how to property display the focus rectangle in this situation ?
Just an idea, what if you set the width of all radio button's to be same as the CompactPaneLength property of SplitView. The default is 48 DIPs.

Draggable TextBox in WPF

Is there any way to create a draggable textbox in WPF ? I can see lot of ways of creating draggable TextBlock in WPF. But can't find a similar way to achieve this for Textbox.
Normally a drag is started if the mouse is moved a few pixels while at least one mouse button is down. This "pattern" also appears when selecting text in a textbox. It seems there will be no way to tell this actions apart, so this might be the reason there is no "movable textbox" designed this way.
As a possible way to solve your problem you could take this approach into account: Universally usable editable label
Alternatively you could add some area to your textbox, which reacts to moving.
<StackPanel Orientation="Horizontal">
<Rectangle x:Name="DraggablePart" .../>
<TextBox .../>
</StackPanel>
Or even some kind of adorner, which will appear only, when the textbox is hovered.

Resources