WiX/Msi textbox border covered up by background image if text is too long - textbox

I have an edit control on my custom dialog, that defaults to a session property SERVICE_URL.
<Control Id="serviceUrlTextBox" Type="Edit" X="135" Y="45" Height="17" Width="215" Property="SERVICE_URL" />
If the text fits the textbox, everything looks alright, if the text is too long however, the border goes missing. If the user adds/removes text (once the dialog is shown), that doesn't change the appearance, only the initial length has an effect.
Using Multiline="yes" does not help, the text is never wrapped and there is no border either.
How can I keep the border even if the text is too long? I'm using WiX Toolset v3.8.
EDIT: The background plays a role, as Buzka suggested (notice the background "crowding in" when the text is too long). Clearly a bug. Any ideas how I can get it to work short of removing the background?
That's how I have created the different background:
<Binary Id="dialogBackground" SourceFile="Resources\WixUIDialogBackground.png"/>
<Control Id="background" Type="Bitmap" Text="dialogBackground" Width="370" Height="243" X="0" Y="53" TabSkip="no" />
<Control Id="explanationLabel" X="135" Y="23" NoWrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="215" Height="100" Text="Please provide the URL of the SettingsService. If you prefer, you may change it at a later stage in the Settings." />
<Control Id="serviceUrlTextBox" Type="Edit" X="135" Y="45" Height="17" Width="215" Property="SERVICE_URL" />

I'm using v3.8 too, don't have that problem in my installer. I can see you use custom background color, maybe thats reason?
#Edit
I mean maybe you should set custom border to textbox too? Or try with default backgroud color.
#Edit
After LOOOOONG searching... i found something like this:
Unfortunately, that's how MSI draws it. There's no concept of a custom
control in MSI UI, so there's nothing WiX can do to fix it.
So i think my answer was good, no chances to change it, cause it's not supported.

Related

Change background color of a card when the element in the card is being focused

I am using Ant Design and I am new to it. In my case, there are many input components inside a card component. I would like to change the card background color when any input component inside the card is being focused.
I would like to see if there is a simple way to do so, or I have to write JavaScript functions for this case.
I am appreciate with any help on this case. It is grateful if any sample code can be provided. Thank you very much.
P.S. I am able to change the background color of the card. But I cannot find any API on card component which provide this kind of function.
Use CSS trick like following
CSS
.highlight:focus-within {
background: #a1c084;
}
JS
<Card title="Card Name" className="hightlight">
<Input placeholder="Your Input" />
</Card>
I hope this would help
Code Pen : https://codepen.io/shreyans-shrivastav/pen/LawoYE

How to enable or disable the buttons in windows phone 7?

My Design has the following lines of code:
<Button BorderThickness="0" Content="Done" FontSize="21.333" Height="65" Margin="334,13,6,0" VerticalAlignment="Top" FontFamily="Times New Roman" Name="btnConvert" >
<Button.Background>
<ImageBrush ImageSource="Images/button_back2.png" />
</Button.Background>
</Button>
My code goes btnConvert.IsEnabled = false;.
It can't disable the button. Instead, it hides the button. I need that button to be visible but disabled. Please help me.
Isenabled works for me. try your xaml code in some xaml viewer to check if you are not doing anything wrong
This is what I usually do:
`btnConvert.IsHitTestVisible = false;`
It will disable the button, but you can see the button with the same colors at beginning.

How to remove the ListPicker Header in Windows Phone 7 toolkit control?

Is there any way to completely remove the header in the Windows Phone 7 control toolkit ListPicker? E.g., setting the header height size = 0 or something similar?
In my app I want to remove the header in order to reduce the space taken up by the list picker. I'm going to have the default selected item in the list picker with a descriptive text instead (along with a valid value of course). I've solved that part.
Thanks in advance for any help!
Download the source from here:
http://silverlight.codeplex.com/SourceControl/changeset/changes/71382
Open up ListPickerPage.xaml (Microsoft.Phone.Controls.Toolkit -> ListPicker)
Find this section of code:
<!-- Header Title -->
<TextBlock
x:Name="HeaderTitle"
Grid.Row="0"
FontFamily="{StaticResource PhoneFontFamilySemiBold}"
FontSize="{StaticResource PhoneFontSizeMedium}"
Foreground="{StaticResource PhoneForegroundBrush}" Visibility="Collapsed"
Margin="24 12 12 12">
<TextBlock.Projection>
<PlaneProjection RotationX="-90"/>
</TextBlock.Projection>
</TextBlock>
Note that the Visibility is now set to Collapsed
Then, below it, find the ListBox code
<!-- List of Items -->
<ListBox
x:Name="Picker"
Grid.Row="1"
ItemsSource="{Binding}"
Opacity="0"
toolkit:TiltEffect.IsTiltEnabled="True"
Margin="24 -24 0 0"
Tap="OnPickerTapped"/>
</Grid>
Note that I changed the margin here to -24.
Mess with it till you find the look that you need. Make sure you have your app use the DLL that is created when you build the Silverlight Toolkit project.
There could be a better way. For example, you could create your own PickerPageUri .
But, I'm not entirely sure that modifying the UI in this way to achieve another 40px of space is really worth breaking the WP7 paradigm. But whatever, your choice.

Set custom theme with default page background in WP7.1 Mango

I'm creating a WP Mango app. I want to set the default page background to White, irrespective of whether Light or Dark Theme is selected, exactly like the default mail application.
I've followed this article and tried changing the default PhoneBackgroundBrush as:
(Application.Current.Resources["PhoneBackgroundBrush"]as SolidColorBrush).Color = Colors.White;
Any idea what I'm doing wrong or how to achieve that?
I messed with the sample, and simply don't recommend doing this. Do the extra work, create your own resources, and apply them yourself.
This method doesn't show updates in the designer, which will make your UI development difficult.
It also doesn't even work properly -- the background doesn't change. If you read the comments on the blog post, there are other issues with it working with other controls.
So, just do it normally - in your App.xaml (you could also do it in a seperate ResourceDictionary)
<!--Application Resources-->
<Application.Resources>
<SolidColorBrush Color="White" x:Key="WhiteBrush" />
<SolidColorBrush Color="#FFF222" x:Key="UglyYellowBrush" />
</Application.Resources>
then, on a page
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="{StaticResource UglyYellowBrush}">
... </Grid>
You could even do this quickly on all your pages using Find & Replace, provided that you never changed the name 'LayoutRoot'. If you find
<Grid x:Name="LayoutRoot" Background="Transparent">
you can replace with
<Grid x:Name="LayoutRoot" Background="{StaticResource UglyYellowBrush}">
The solution of creating your own style did not work for me. I tried setting the background to a light gray which worked in the design view but when I ran the emulator the standard black background appeared.

how to create context menu in statusbar?

I have some problems
1. how do I make my statusbar context menu that consists of 2 choices of menu preferences and addons status
example of context menu i want to make
this is my code :
<popupset>
<menupopup id="intransContextMenu">
<menuitem label="intrans aktif"/>
<menuitem label="preferensi"/>
</menupopup>
</popupset>
<statusbar id="status-bar">
<image src="chrome://inlinetrans/skin/imagesOn_kecil.png" />
<statusbarpanel id="status-bar-intrans"
label="intrans"
context="intransContextMenu"
onclick="alert('okeh cuy')"
tooltiptext="intrans versi 1.0"
/>
</statusbar>
how to add images in the context menu? I have tried but why do I paste a picture that always appears under the label is not on the side of the label as I expected?
example of context menu i want to make
this is my code :
<popup id="contentAreaContextMenu">
<image src="chrome://inlinetrans/skin/imagesOn_kecil.png" />
<menuitem class="inlinetrans" id="inlineContext" oncommand= "hadits_mean.startFind(null);"
label="Cari Terjemahan"/>
</popup>
note :
whether the code used to display the menu by right clicking on the statusbar and allows web pages to be made in one file?
thank you for the answer..
I am not sure if the images are your only problem now? Opening the context menu should work (you are using the context attribute correctly).
Regarding images, have a look at the documentation. For statusbarpanel, you have to set the image attribute:
<statusbar id="status-bar">
<statusbarpanel id="status-bar-intrans"
image="chrome://inlinetrans/skin/imagesOn_kecil.png"
label="intrans"
context="intransContextMenu"
onclick="alert('okeh cuy')"
tooltiptext="intrans versi 1.0"
/>
</statusbar>
You might also want to have a look at the style classes and play with them (to be honest I'm not 100% sure if it is just sufficient to set the image attribute, so if this does not work, try with the style classes).
Similar for the menuitem. You have to set the image attribute and give the element the style class menu-iconic:
<menuitem class="inlinetrans menu-iconic"
id="inlineContext"
oncommand= "hadits_mean.startFind(null);"
label="Cari Terjemahan"
image="chrome://inlinetrans/skin/imagesOn_kecil.png"/>
Note: Afaik the statusbar is going to be removed in Firefox 4 (at least by default it is disabled)!

Resources