Click here to Skip to main content
15,886,061 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
Pete O'Hanlon27-Oct-09 0:56
mvePete O'Hanlon27-Oct-09 0:56 
GeneralRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
ChandrakanthGaddam27-Oct-09 1:08
ChandrakanthGaddam27-Oct-09 1:08 
GeneralRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
Pete O'Hanlon27-Oct-09 1:36
mvePete O'Hanlon27-Oct-09 1:36 
QuestionReference to parent collection Pin
ausadmin26-Oct-09 19:38
ausadmin26-Oct-09 19:38 
AnswerRe: Reference to parent collection Pin
Pete O'Hanlon26-Oct-09 22:44
mvePete O'Hanlon26-Oct-09 22:44 
GeneralRe: Reference to parent collection Pin
ausadmin27-Oct-09 9:54
ausadmin27-Oct-09 9:54 
GeneralRe: Reference to parent collection Pin
Pete O'Hanlon27-Oct-09 10:12
mvePete O'Hanlon27-Oct-09 10:12 
GeneralRe: Reference to parent collection Pin
ausadmin27-Oct-09 19:16
ausadmin27-Oct-09 19:16 
GeneralRe: Reference to parent collection Pin
ausadmin29-Oct-09 1:33
ausadmin29-Oct-09 1:33 
QuestionUserControl - visualbrush not rendered Pin
DeepakMega26-Oct-09 3:04
DeepakMega26-Oct-09 3:04 
I am new to wpf.
I have created a reflective textblock usercontrol .
<UserControl
    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" x:Class="LogoCreator.ReflectiveTextBlock"
    Height="50" Width="189" mc:Ignorable="d">
	<UserControl.Resources>
		<VisualBrush x:Key="ReflectionBrush" Visual="{Binding ElementName=textBlock}"/>
	</UserControl.Resources>    
<Grid>
		<Grid.RowDefinitions>
     		<RowDefinition Height="Auto" />
     		<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>            
    	<TextBlock x:Name="textBlock" Grid.Row="0" Margin="0" FontSize="18.667" Text="Sample1" TextWrapping="Wrap" HorizontalAlignment="Left" Background="White"/>
    	<Rectangle x:Name="Reflection" Grid.Row="1" Margin="0,1,0,-32" RenderTransformOrigin="0.5,0.5" Fill="{DynamicResource ReflectionBrush}">

    		<Rectangle.OpacityMask>
    			<LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
    				<GradientStop Color="#7EFFFFFF" Offset="0"/>
    				<GradientStop Offset="0.5"/>
    			</LinearGradientBrush>
    		</Rectangle.OpacityMask>
    		<Rectangle.LayoutTransform>
    			<TransformGroup>
    				<ScaleTransform ScaleX="1" ScaleY="-1"/>
    			</TransformGroup>
    		</Rectangle.LayoutTransform>

    	</Rectangle>
            
    </Grid>
</UserControl>


I have the rectangles fill property set to the textblocks visual brush.
The problem is when this control is add to the main window canvas, it shows only the text, the reflection is not shown.
Is it because the visualbrush resource is within the usercontrol ?
How do i solve it ?
AnswerRe: UserControl - visualbrush not rendered Pin
DeepakMega26-Oct-09 4:16
DeepakMega26-Oct-09 4:16 
Question3D Graphics C# and WPF Browser Application Pin
427748025-Oct-09 9:04
427748025-Oct-09 9:04 
GeneralRe: 3D Graphics C# and WPF Browser Application Book recommendation Pin
Richard MacCutchan25-Oct-09 13:31
mveRichard MacCutchan25-Oct-09 13:31 
AnswerRe: 3D Graphics C# and WPF Browser Application Pin
Death8U29-Oct-09 7:31
Death8U29-Oct-09 7:31 
QuestionMVVM Pattern Pin
NETLearning24-Oct-09 18:21
NETLearning24-Oct-09 18:21 
AnswerRe: MVVM Pattern Pin
Richard MacCutchan24-Oct-09 23:07
mveRichard MacCutchan24-Oct-09 23:07 
AnswerRe: MVVM Pattern Pin
Steve Westbrook26-Oct-09 7:00
Steve Westbrook26-Oct-09 7:00 
QuestionWPF MVVM Pin
NETLearning24-Oct-09 15:02
NETLearning24-Oct-09 15:02 
AnswerRe: WPF MVVM Pin
Richard MacCutchan24-Oct-09 23:08
mveRichard MacCutchan24-Oct-09 23:08 
QuestionMVVM newbie question - showing OpenFileDialog? Pin
Judah Gabriel Himango24-Oct-09 14:33
sponsorJudah Gabriel Himango24-Oct-09 14:33 
AnswerRe: MVVM newbie question - showing OpenFileDialog? Pin
Pete O'Hanlon25-Oct-09 9:36
mvePete O'Hanlon25-Oct-09 9:36 
GeneralRe: MVVM newbie question - showing OpenFileDialog? Pin
Judah Gabriel Himango25-Oct-09 16:01
sponsorJudah Gabriel Himango25-Oct-09 16:01 
GeneralRe: MVVM newbie question - showing OpenFileDialog? Pin
Pete O'Hanlon25-Oct-09 22:05
mvePete O'Hanlon25-Oct-09 22:05 
QuestionWpf Pin
miralireza24-Oct-09 8:44
miralireza24-Oct-09 8:44 
AnswerRe: Wpf Pin
Pete O'Hanlon24-Oct-09 9:13
mvePete O'Hanlon24-Oct-09 9:13 

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.