Click here to Skip to main content
15,914,447 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hai my dear friends,
i have a problem in wpf becoz i create some fields in wpf and it works well in my computer but when i check other machine its not like tat so please help me if yu can i just add my code here.
Quote:
<window x:class="SmokeUIWpf.Window1" xmlns:x="#unknown">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="600" Width="908" >
<grid>
<dockpanel name="dockPanel1" removed="#F7C692" margin="0,0,0,-77">
<tabcontrol height="470" tabstripplacement="Top" verticalalignment="Stretch" horizontalalignment="Stretch" removed="Blue" borderbrush="Black" name="tabControl1" grid.column="1" margin="1,30,8,26" width="884">
<tabitem header="Commission" isselected="True" removed="Gray">

<stackpanel removed="Brown" verticalalignment="Stretch" horizontalalignment="Stretch">
<!-- this is base stackpanel starting-->

<stackpanel removed="Coral" name="mainpage" height="450" width="873">
<!-- this is stack panel1(main page starting)-->
<Label Margin="50,40,10,51" HorizontalAlignment="Left" Width="162">. Device Configuration</Label>
<wrappanel removed="#F0D0B9" margin="30,-40,10,51" orientation="Vertical" height="274" width="769">
<Button Content="General Settings" Margin="5" Click="Button_Click" Width="170" />
<Button Content="Reginal Settings" Margin="5" Width="170"/>
<Button Content="Smoke Threshold" Margin="5" Width="170" />
<Button Content="Temp/Humidity Threshold" Margin="5" Width="170" />
<Button Content="Airflow" Margin="5" Width="170" />
<Button Content="Filter and Auto maintenace" Margin="5" Width="170"/>
<Button Content="Relays" Margin="5" Width="170" />
<Label Margin="220,-35,10,51" HorizontalAlignment="Left" Width="162">.Additional Feature Settings</Label>
<Button Content="Filter and Auto maintenace" Width="170" Margin="230,-37,10,51" />
<Button Content="Relays" Width="170" Margin="230,-40,10,51" />



<!-- this is general setting stackpanel starting-->
<stackpanel height="454" margin="0,-525,10,-77" visibility="Hidden" removed="#FFEFE3" name="gnrlsttngspg" width="873">
<Label Margin="50,40,10,51" HorizontalAlignment="Left" Width="162">Device Configuration</Label>
<Label Margin="60,-40,10,51" HorizontalAlignment="Left" Width="162">.General Settings</Label>
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="108">Device Name:</Label>
<combobox height="25" name="comboBox1" width="119" margin="-400,-75,10,51">
<comboboxitem>Aurora1
<comboboxitem>Aurora2
<comboboxitem>Aurora3

<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="108">Device Serial No:</Label>
<textbox margin="-400,-75,10,51" width="119">
<wrappanel orientation="Horizontal" width="406" margin="400,150,10,51">
<Button Content="Ok" Margin="5" Width="70" />
<Button Content="Cancel" Margin="5" Width="70" />
<Button Content="Back" Margin="5" Width="70" Click="Button_Click_1" />
<Button Content="Next" Margin="5" Width="70" Click="Button_Click_2" />
<Button Content="Apply" Margin="5" Width="70" />



<!-- this is smoke threshold stackpanel-->

<stackpanel visibility="Hidden" name="threshold_stkpnl" removed="#EDB9CC" width="873" margin="0,-500,10,-77" height="450">
<Label Margin="50,40,10,51" HorizontalAlignment="Left" Width="162">Device Configuration</Label>
<Label Margin="60,-40,10,51" HorizontalAlignment="Left" Width="162">.Smoke Threshold</Label>
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="117">Instant Fire:</Label>
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="117">Apply UL Limits:</Label>
<checkbox height="16" name="fire_chk" width="120" margin="-360,-140,10,51">
<checkbox height="16" name="apl_chk" width="120" margin="-360,-75,10,51">

<Label Margin="65,-30,10,51" HorizontalAlignment="Left" Width="117">Instant Fire:</Label>
<textbox margin="-400,-75,10,51" width="123" height="23" textalignment="Center">0.6250%/ft
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="117">Instant Fire:</Label>
<textbox margin="-400,-75,10,51" width="123" height="28" textalignment="Center">0.6250%/ft
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="117">Instant Fire:</Label>
<textbox margin="-400,-75,10,51" width="123" height="28" textalignment="Center">0.0430%/ft
<Label Margin="65,-40,10,51" HorizontalAlignment="Left" Width="117">Instant Fire:</Label>
<textbox margin="-400,-75,10,51" width="123" height="28" textalignment="Center">0.0250%/ft

<Label Margin="310,-380,10,51" HorizontalAlignment="Left" Width="84" Height="26">Delay in Sec</Label>
<textbox margin="-180,-325,10,51" width="40" height="28" textalignment="Center">
<textbox margin="-180,-240,10,51" width="40" height="28" textalignment="Center">
<textbox margin="-180,-160,10,51" width="40" height="28" textalignment="Center">
<textbox margin="-180,-80,10,51" width="40" height="28" textalignment="Center">

<Label Margin="525,-430,10,51" HorizontalAlignment="Left" Width="226" Height="31">Auto Learn Smoke Period</Label>
<Label Margin="525,-330,10,51" HorizontalAlignment="Left" Width="60" Height="31">Days:</Label>
<Label Margin="525,-230,10,51" HorizontalAlignment="Left" Width="60" Height="31">HH:MM:</Label>
<textbox margin="360,-330,10,51" width="60" height="28" textalignment="Center">
<textbox margin="360,-230,10,51" width="60" height="28" textalignment="Center">
<Label Margin="525,-130,10,51" HorizontalAlignment="Left" Width="226" Height="31">Note : Minimum -30 Minutes</Label>


<wrappanel orientation="Horizontal" width="406" margin="400,-35,10,51">
<Button Content="Ok" Margin="5" Width="70" />
<Button Content="Cancel" Margin="5" Width="70" />
<Button Content="Back" Margin="5" Width="70" Click="Button_Click_3" />
<Button Content="Next" Margin="5" Width="70" />
<Button Content="Apply" Margin="5" Width="70" />








<tabitem header="Maintenance" removed="Gray">
<tabitem header="GSM" removed="Gray">
<tabitem header="Display" removed="Gray">
<stackpanel height="235" verticalalignment="Top" horizontalalignment="Stretch" removed="LightGoldenrodYellow" name="stackPanel1" width="869">
<Button Height="23" Margin="20" Name="button1" Width="75" Click="button1_Click_1">Read Data</Button>
<richtextbox height="100" verticalalignment="Center" horizontalalignment="Center" name="richTextBox1" width="200">
<Button Height="23" Margin="10" Name="button2" Width="75">Port Close</Button>


<tabitem header="Event Log" removed="Gray">
<tabitem header="Manager" removed="Gray">



<stackpanel height="83" verticalalignment="Top" dockpanel.dock="Top" removed="Black">
<Image Name="image1" Stretch="Fill" Height="83" VerticalAlignment="Top" AllowDrop="True" Source="D:\c# sql\C# programes\SmokeUIWPF\image\firepro2.jpg" HorizontalAlignment="Left" Width="149" />
<Image Height="70" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="98" HorizontalAlignment="Right" />




Posted
Updated 16-Nov-11 0:03am
v2
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 4:27am    
What's the problem?
--SA
steven8Gerrard 16-Nov-11 6:02am    
I have created a page with a button inside a stack panel when i run the application in another system alignement is different . How to solve this issue?

1 solution

In stead of specifying absolute co-ordinates, you can use styles and templates with relative term.


*Edit by MSalsbery* Agree! If you're not familiar with their usage already, play around with the various Panel[^] elements and learn how they layout their child elements. Then you'll know how to control layout in resizable content and not have to use all those absolute coordinates.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900