Click here to Skip to main content
15,038,997 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Can anyone recommend a free WPF editor? Pin
Slacker00723-Jul-21 5:01
professionalSlacker00723-Jul-21 5:01 
GeneralRe: Can anyone recommend a free WPF editor control? Pin
Richard Deeming27-Jul-21 23:16
mveRichard Deeming27-Jul-21 23:16 
GeneralRe: Can anyone recommend a free WPF editor control? Pin
Mike Hankey28-Jul-21 2:05
professionalMike Hankey28-Jul-21 2:05 
QuestionInstalling Test Mode vs Production Mode Pin
Kevin Marois19-Jul-21 8:55
professionalKevin Marois19-Jul-21 8:55 
QuestionRouted Event Args Null Pin
Kevin Marois28-Jun-21 16:28
professionalKevin Marois28-Jun-21 16:28 
AnswerRe: Routed Event Args Null Pin
Richard Deeming28-Jun-21 22:34
mveRichard Deeming28-Jun-21 22:34 
QuestionHow to change background color in combobox in code behind? Pin
Cường Nguyễn Văn 202123-Jun-21 6:56
MemberCường Nguyễn Văn 202123-Jun-21 6:56 
QuestionMake textbox fill up and resizie Pin
Acuena21-Jun-21 20:59
MemberAcuena21-Jun-21 20:59 
Hi!
Sorry for weird subject but was a bit unsure on what to call it.

Anyway, I have a WPF-form where I have some items below a textbox. I want the textbox to fill up the grid above the bottom controls but leave space for them.

C#
<Window x:Class="SMS_Sender_3._0.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:SMS_Sender_3._0"
        mc:Ignorable="d"
        Title="SMS Sender 3.0" Height="350" Width="525">
    <Grid>
        <Border Margin="8">
            <StackPanel>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Phone:" />
                    <TextBox Grid.Column="1" />
                </Grid>

                <TextBlock Text="Message:" />

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="225" />
                    </Grid.RowDefinitions>

                    <TextBox Grid.Column="1" />
                </Grid>

                <Grid Margin="0,3,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Mall:" />
                    <ComboBox Grid.Column="1" />
                    <TextBlock Margin="5,0,0,0" Grid.Column="2" Text="0/160(1)" />
                    <Button Grid.Column="3" HorizontalAlignment="Right" Content="_Send" Width="100" />
                </Grid>
                <Grid Margin="0,3,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Type:" />
                    <ComboBox Grid.Column="1" HorizontalAlignment="Left" Width="150" />
                </Grid>
            
            </StackPanel>
        </Border>
    </Grid>
</Window>


As it is now, the textbox will change it width but not it's height, due to it being set to 225 in the grid definition. However, I am unsure how to set the grid so that it will take up the space but leave the bottom controls visible. Basically I want it to be as it is now but able to resize.

I am thankfull for any suggestions.
Have a nice day!
I am using JetBrains Rider!

AnswerRe: Make textbox fill up and resizie Pin
Richard Deeming21-Jun-21 21:58
mveRichard Deeming21-Jun-21 21:58 
AnswerRe: Make textbox fill up and resizie Pin
Gerry Schmitz22-Jun-21 7:07
mveGerry Schmitz22-Jun-21 7:07 
Question[Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Oscar Tsai18-Jun-21 7:34
MemberOscar Tsai18-Jun-21 7:34 
AnswerRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Gerry Schmitz19-Jun-21 14:29
mveGerry Schmitz19-Jun-21 14:29 
GeneralRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Oscar Tsai20-Jun-21 3:20
MemberOscar Tsai20-Jun-21 3:20 
GeneralRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Gerry Schmitz20-Jun-21 6:01
mveGerry Schmitz20-Jun-21 6:01 
AnswerRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Richard Deeming20-Jun-21 23:37
mveRichard Deeming20-Jun-21 23:37 
GeneralRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Oscar Tsai21-Jun-21 4:10
MemberOscar Tsai21-Jun-21 4:10 
GeneralRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
Oscar Tsai21-Jun-21 16:11
MemberOscar Tsai21-Jun-21 16:11 
AnswerRe: [Problem] Why can not Pass Image between 2 Views by using the same ViewModel (MVVM) Pin
michaelbarb23-Sep-21 10:32
Membermichaelbarb23-Sep-21 10:32 
QuestionProblem Setting Focus Pin
Kevin Marois24-May-21 9:39
professionalKevin Marois24-May-21 9:39 
AnswerRe: Problem Setting Focus Pin
Richard Deeming24-May-21 21:56
mveRichard Deeming24-May-21 21:56 
QuestionImpossible to override a value in an animation located in a style? Pin
Mc_Topaz20-May-21 6:51
MemberMc_Topaz20-May-21 6:51 
AnswerRe: Impossible to override a value in an animation located in a style? Pin
Gerry Schmitz20-May-21 8:08
mveGerry Schmitz20-May-21 8:08 
QuestionApp Security Behavior Pin
Kevin Marois20-May-21 6:09
professionalKevin Marois20-May-21 6:09 
QuestionOverride a value in base style's resource Pin
Mc_Topaz20-May-21 2:45
MemberMc_Topaz20-May-21 2:45 
AnswerRe: Override a value in base style's resource Pin
Richard Deeming20-May-21 4:33
mveRichard Deeming20-May-21 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.