# Other .NET Programming > Windows Presentation Foundation (WPF) & XAML forum >  WPF change UserControl textblock from another window

## StealthRT

Hey all I am new at WPF so here is my question.

How can I change the text in a textblock from my mainwindow when the textblock is in the window named curTemp.xaml?

curTemp.xaml Code:


```
public partial class curTemp : UserControl
    {
        public string _valTempChange
        {
            get { return middleForcastCurrentTemp.Text; }
            set { middleForcastCurrentTemp.Text = value; }
        }

        public curTemp()
        {
            InitializeComponent();
        }
    }
```

Xaml of the above UserControl:



```
<Grid>
        <TextBlock TextWrapping="Wrap" Padding="5" Foreground="White" Panel.ZIndex="7" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="15,-110,-43,0" Width="198" Height="122">
            <TextBlock.Effect>
                <DropShadowEffect BlurRadius="4" Direction="0" ShadowDepth="0" />
            </TextBlock.Effect>
                    <outlineText:OutlinedTextBlock Height="146" Width="192" TextOptions.TextRenderingMode="Aliased" FontFamily="Segoe UI" FontSize="100" x:FieldModifier="public" x:Name="middleForcastCurrentTemp" 
                                            FontWeight="Medium" TextWrapping="Wrap" TextAlignment="Right" Stroke="Black" StrokeThickness="3" Fill="White" Text="10"/>
        </TextBlock>
    </Grid>
```

And in my MainWindow code:


```
public MainWindow()
        {
            InitializeComponent();

            curTemp _curTempWindow = new curTemp();

            _curTempWindow._valTempChange = "55";

        }
```

﻿﻿When I run that code it never shows "55" in the textblock. It only shows my default text "10".

What am I doing incorrectly here?

----------


## Arjay

You need to implement INotifyPropertyChanged. See http://www.wpftutorial.net/INotifyPropertyChanged.html

Not that it matters, but you may want to follow the C# naming conventions for classes, properties, variables, etc. While it doesn't strictly matter for code that is only maintained by you, it does make it harder for others to maintain your code if you ignore the basic conventions.

----------

