{"id":262037,"date":"2026-07-13T18:46:39","date_gmt":"2026-07-13T15:46:39","guid":{"rendered":"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/"},"modified":"2026-07-13T18:46:39","modified_gmt":"2026-07-13T15:46:39","slug":"gui-programming-with-c-marcelo-guerra-hahn","status":"publish","type":"post","link":"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/","title":{"rendered":"GUI Programming With C &#8211; Marcelo Guerra Hahn"},"content":{"rendered":"<figure style=\"text-align:center;margin:0 auto 1.5em;\"><img decoding=\"async\" src=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/f556ab38ea5338fb.jpg\" alt=\" - Unknown book cover\" style=\"max-width:300px;width:100%;height:auto;box-shadow:0 4px 12px rgba(0,0,0,.25);border-radius:4px;\"\/><\/figure>\n<p>\/> In this case, the label displays &#8220;Hello, World!&#8221;. The Entry element provides a single-line text input field where users can type information. An example is shown here: <Entry Placeholder=\"Enter text here\" \/> This entry field has a placeholder that prompts the user with &#8220;Enter text here&#8221;. A ListView element displays a list of items and can be customized with templates.<\/p>\n<p>Here\u2019s an example of how to bind a list of items with a name and description: <ListView ItemsSource=\"{Binding Items}\"> <ListView.ItemTemplate> <DataTemplate> <TextCell Text=\"{Binding Name}\" Detail=\"{Binding De <\/DataTemplate> <\/ListView.ItemTemplate> <\/ListView> In this example, each item in the list is bound to a Name and Description property from the data source. Styling and theming enhance the visual consistency of an application. The Style element allows you to define reusable settings for controls. For instance, the following code defines a style for labels. It\u2019s recommended that this code is added in a file under the Styles folder \u2013 for example, Styles.xaml: <ResourceDictionary> <Style TargetType=\"Label\"> <Setter Property=\"TextColor\" Value=\"Blue\" \/> <Setter Property=\"FontSize\" Value=\"20\" \/> <\/Style> <\/ResourceDictionary> This style changes the text color of all labels to blue and sets their font size to 20.<\/p>\n<p>Similarly, the Theme element allows you to define light and dark modes for the application. The following example shows how to apply a different background color, depending on the theme: <ResourceDictionary> <Style TargetType=\"ContentPage\" ApplyToDerivedTypes=\"True\"> <Setter Property=\"BackgroundColor\" Value=\"{AppThemeBind <\/Style> <\/ResourceDictionary> In this case, the background color has been set to white in light mode and black in dark mode, enhancing the user experience based on the user\u2019s preferences. With the UI in place, the next step is to make the application interactive.<\/p>\n<p>In the next section, we\u2019ll explore how to handle user actions such as button clicks, text input, and navigation using C#. We\u2019ll cover event handling, data binding, and commanding to create responsive, dynamic applications that respond to user input. So, let\u2019s dive into adding interactivity to your application. Adding interactivity with C# In .NET MAUI, event handling allows the application to respond to user interactions by executing event handlers, which are methods that are triggered when an event occurs.<\/p>\n<blockquote>\n<p>GUI Programming with C# Learn GUI development by building beginner-friendly apps with Blazor, MAUI, and WinUI 3 Marcelo Guerra Hahn GUI Programming with C# Copyright \u00a9 2026 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented.<\/p>\n<p>However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Portfolio Director: Kunal Chaudhari Relationship Lead: Samriddhi Murarka Project Manager: K.<\/p>\n<p>Loganathan Content Engineer: Gowri Rekha Technical Editor: Aditya Bharadwaj Copy Editor: Safis Editing Indexer: Tejal Soni Proofreader: Gowri Rekha Production Designer: Shankar Kalbhor Growth Lead: Vinishka Kalra First published: February 2026 Production reference: 2230226 Published by Packt Publishing Ltd. Grosvenor House 11 St Paul\u2019s Square Birmingham B3 1RB, UK. ISBN 978-1-83588-254-2 www.packtpub.com Contributors About the author Marcelo Guerra Hahn is an educator, technologist, and software developer with experience in computer science and modern application development. He has worked extensively with C# and .NET technologies, focusing on building practical, industry-aligned learning experiences.<\/p>\n<p>Marcelo combines academic rigor with real-world application, emphasizing clean architecture, performance optimization, and maintainable software design. His work bridges the gap between foundational computer science principles and modern development practices. About the reviewers Ricardo Peres is a Portuguese developer from Coimbra, Portugal, where he lives and works. He graduated in informatics engineering from the University of Coimbra and works as a tech lead at Evolve Software. Ricardo is a blogger, author, and contributor to open source projects, a book author and reviewer, and is currently doing a PhD in AI and microservices architectures.<\/p>\n<p>His interests include distributed services, architectures, enterprise application integration, design patterns, and LLMs. Naga Santhosh Reddy Vootukuri is a principal software engineering manager at Microsoft, specializing in cloud computing and artificial intelligence within the C+AI division. Naga has authored and published numerous research articles in peer-reviewed and indexed journals. He has reviewed 10+ technical books on cloud computing and AI. He is a senior member of IEEE and teaches workshops on AI. He writes technical articles as a Core MVB member at DZone, engaging with millions of active readers.<\/p>\n<p>He has presented at 15+ WW conferences about the cloud, AI, and distributed systems.<\/p>\n<\/blockquote>\n<p><em>This is a short excerpt from the opening of &ldquo;&rdquo; by Unknown, quoted for review and introduction purposes. All rights belong to the copyright holders.<\/em><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/#Book_Information\" >Book Information<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/#Reading_Word_Statistics\" >Reading &amp; Word Statistics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/#Most_Frequent_Words\" >Most Frequent Words<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/1kitap1.com\/en\/gui-programming-with-c-marcelo-guerra-hahn\/#PDF_Download\" >PDF Download<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Book_Information\"><\/span>Book Information<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Unique ID:<\/strong> f556ab38ea5338fb<\/li>\n<li><strong>File Extension:<\/strong> .pdf<\/li>\n<li><strong>File Size:<\/strong> 3,345,551 bytes (3.191 MB)<\/li>\n<li><strong>Title:<\/strong> &#8211;<\/li>\n<li><strong>Author:<\/strong> Unknown<\/li>\n<li><strong>ISBN:<\/strong> 9781835882542<\/li>\n<li><strong>Pages:<\/strong> 277<\/li>\n<li><strong>Language:<\/strong> English (en)<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Reading_Word_Statistics\"><\/span>Reading &amp; Word Statistics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Estimated Reading Time:<\/strong> 210.31 minutes<\/li>\n<li><strong>Total Words:<\/strong> 42,062<\/li>\n<li><strong>Total Characters:<\/strong> 297,365<\/li>\n<li><strong>Average Words per Page:<\/strong> 151.85<\/li>\n<li><strong>Average Characters per Page:<\/strong> 1073.52<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Most_Frequent_Words\"><\/span>Most Frequent Words<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>net (312), data (300), application (271), code (266), user (242), applications (232), development (222), view (198), binding (197), app (188), maui (186), components (184), winui (182), using (179), blazor (172), razor (150), project (149), model (143), windows (140), create (140), developers (139), text (136), example (129), xaml (124), visual (116), following (111), button (111), component (111), web (109), new (106), name (106), use (98), studio (97), set (91), file (91), chapter (88), creating (86), mvvm (85), controls (84), performance (83), elements (83), public (78), property (78), logic (78), webassembly (76), structure (75), page (74), experience (73), input (73), content (72), interface (72), between (71), event (71), value (70), across (68), different (68), get (67), allows (66), design (63), techniques (62), platforms (61), dynamic (61), features (61), course (61), control (60), class (60), com (59), properties (59), platform (58), string (57), used (56), figure (56), android (56), grid (56), within (55), build (53), state (53), framework (52), debugging (52), next (52), building (51), changes (51), responsive (51), tools (50), section (50), run (50), textblock (50), desktop (49), microsoft (48), interactive (48), updates (48), click (48), understanding (47), management (47), essential (47), simple (47), method (47), label (46), setting (46), private (45).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"PDF_Download\"><\/span>PDF Download<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align:center;\"><a href=\"https:\/\/1kitap1.com\/en\/wp-content\/uploads\/2026\/07\/gui-programming-with-c-marcelo-guerra-hahn.pdf\" download rel=\"nofollow\" style=\"display:inline-block;background:#2271b1;color:#ffffff;padding:14px 36px;border-radius:6px;text-decoration:none;font-weight:bold;font-size:1.05em;\">&#11015;&#65039; PDF Download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/> In this case, the label displays &#8220;Hello, World!&#8221;. The Entry element provides a single-line text input field where users can type information. An example is shown here: This entry field has a placeholder that prompts the user with &#8220;Enter text here&#8221;. A ListView element displays a list of items and can be customized with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":262035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-262037","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-english"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/262037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/comments?post=262037"}],"version-history":[{"count":0,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/posts\/262037\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media\/262035"}],"wp:attachment":[{"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/media?parent=262037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/categories?post=262037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1kitap1.com\/en\/wp-json\/wp\/v2\/tags?post=262037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}