To get the height value in WPFIVIlaiyaKumaran V11yAsked Jan 5, 2016, 9:24 PM ESTSolvedShareLinkedInXCopy linkSaveHi, How to get the client side height value using WPF?
To get the height value in WPFIVIlaiyaKumaran V11yAsked Jan 5, 2016, 9:24 PM ESTSolvedShareLinkedInXCopy linkSaveHi, How to get the client side height value using WPF?
Raja TRank #685 · 3.5K reputation11y agoPosted Jan 5, 2016, 11:32 PM EST✓ Accepted answer+1Hi, try like XAML CS MainWindow() after InitializeComponent(); Back_Image.Width = Grid1.Width; Back_Image.Height = Grid1.Height; more details check out below links http://www.c-sharpcorner.com/resources/674/how-to-get-width-and-height-of-a-wpf-control.aspx http://stackoverflow.com/questions/11013316/get-the-height-width-of-window-wpf +1
Rajesh SinghRank #1,806 · 824 reputation11y agoPosted Jan 5, 2016, 9:49 PM EST0Hi Please see this example to get client side height : xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="400" Width="600" WindowStyle="SingleBorderWindow"> ((Grid)this.Content).RenderSize.Height((Grid)this.Content).RenderSize.Width 0Santhakumar MunuswamyRank #128 · 17.3K reputation11y agoPosted Jan 5, 2016, 9:50 PM EST0Hi llaiyaKumaran Could you explain clear requirements that we can able to help to you. you want to get the client system window screen height and width or something else please let me know 0IVIlaiyaKumaran V9 reputation11y agoPosted Jan 5, 2016, 10:24 PM EST0Hi I'm set the height and width in barcode using WPF.Example:x:Name="barcodeControl" Text="Hai" Symbology="qrbarcode" Height="89" Width="108" In the above line how to get the height and width in barcode control.cs that is WPF file . 0Rajesh SinghRank #1,806 · 824 reputation11y agoPosted Jan 5, 2016, 11:15 PM EST0Hi As per my understanding of your problem, you want to get height and width of barcode control in .cs file through code. double height = barcodeControl.Height; double width = barcodeControl.Width; Correct me if my understanding is wrong.Accept the answer if u feel it is right answer. 0IVIlaiyaKumaran V9 reputation11y agoPosted Jan 5, 2016, 11:52 PM EST0Thanks Now i solve that issueThe logic is if (Width > 0.0)barcodecontrol.Width = width; Thanks for your answers.0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Santhakumar MunuswamyRank #128 · 17.3K reputation11y agoPosted Jan 5, 2016, 9:50 PM EST0Hi llaiyaKumaran Could you explain clear requirements that we can able to help to you. you want to get the client system window screen height and width or something else please let me know 0
IVIlaiyaKumaran V9 reputation11y agoPosted Jan 5, 2016, 10:24 PM EST0Hi I'm set the height and width in barcode using WPF.Example:x:Name="barcodeControl" Text="Hai" Symbology="qrbarcode" Height="89" Width="108" In the above line how to get the height and width in barcode control.cs that is WPF file . 0
Rajesh SinghRank #1,806 · 824 reputation11y agoPosted Jan 5, 2016, 11:15 PM EST0Hi As per my understanding of your problem, you want to get height and width of barcode control in .cs file through code. double height = barcodeControl.Height; double width = barcodeControl.Width; Correct me if my understanding is wrong.Accept the answer if u feel it is right answer. 0
IVIlaiyaKumaran V9 reputation11y agoPosted Jan 5, 2016, 11:52 PM EST0Thanks Now i solve that issueThe logic is if (Width > 0.0)barcodecontrol.Width = width; Thanks for your answers.0
Raja TRank #685 · 3.5K reputationPosted Jan 5, 2016, 11:32 PM EST
Rajesh SinghRank #1,806 · 824 reputationPosted Jan 5, 2016, 9:49 PM EST
Santhakumar MunuswamyRank #128 · 17.3K reputationPosted Jan 5, 2016, 9:50 PM EST
IlaiyaKumaran V9 reputationPosted Jan 5, 2016, 10:24 PM EST
Rajesh SinghRank #1,806 · 824 reputationPosted Jan 5, 2016, 11:15 PM EST
IlaiyaKumaran V9 reputationPosted Jan 5, 2016, 11:52 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts