Click here to Skip to main content
15,887,135 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Apply Styles To Custom Control Pin
Richard Deeming7-Jul-15 7:13
mveRichard Deeming7-Jul-15 7:13 
GeneralRe: Apply Styles To Custom Control Pin
Kevin Marois7-Jul-15 7:19
professionalKevin Marois7-Jul-15 7:19 
GeneralRe: Apply Styles To Custom Control Pin
Richard Deeming7-Jul-15 7:41
mveRichard Deeming7-Jul-15 7:41 
GeneralRe: Apply Styles To Custom Control Pin
Kevin Marois7-Jul-15 7:55
professionalKevin Marois7-Jul-15 7:55 
GeneralRe: Apply Styles To Custom Control Pin
Richard Deeming7-Jul-15 8:17
mveRichard Deeming7-Jul-15 8:17 
GeneralRe: Apply Styles To Custom Control Pin
Kevin Marois7-Jul-15 8:18
professionalKevin Marois7-Jul-15 8:18 
Questioncheck out of canvas Pin
ngthtra29-Jun-15 21:36
ngthtra29-Jun-15 21:36 
QuestionProblem in Show/Hide Control in a WPF User Control Pin
Ashfaque Hussain29-Jun-15 20:50
Ashfaque Hussain29-Jun-15 20:50 
Hi, I have 3 buttons in a user control, I would like to show and hide one button from the Host application or from the user control. Its not working for me. Please check it.

XML
<UserControl x:Class="WPFUserControl.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:vis="clr-namespace:WPFUserControl"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <vis:BoolToVisibilityConverter x:Key="BoolToVis" ></vis:BoolToVisibilityConverter>
    </UserControl.Resources>
    <Grid>
        <Button Content="Button1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75"/>
        <Button Content="Button2" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="106,0,0,0"/>
        <Button Content="ShowHide" Visibility="{Binding IsShowHideVisible, Converter={StaticResource BoolToVis}, ConverterParameter=False}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="215,0,0,0"/>

    </Grid>
</UserControl>


C#
public partial class UserControl1 : UserControl, INotifyPropertyChanged
    {
        private bool isShowHideVisible;
        public bool IsShowHideVisible
        {
            get { return isShowHideVisible; }
            set
            {
                if(isShowHideVisible!=value)
                {
                    isShowHideVisible = value;
                    OnPropertyChanged("IsShowHideVisible");
                }
            }
        }
        public UserControl1()
        {
            InitializeComponent();
           // IsShowHideVisible = false;
        }

        private void OnPropertyChange(string pPropertyName)
        {
            if(PropertyChanged!=null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(pPropertyName));
            }

        }

        public event PropertyChangedEventHandler PropertyChanged;
    }


modified 30-Jun-15 3:32am.

AnswerRe: Problem in Show/Hide Control in a WPF User Control Pin
Richard Deeming30-Jun-15 1:10
mveRichard Deeming30-Jun-15 1:10 
GeneralRe: Problem in Show/Hide Control in a WPF User Control Pin
Ashfaque Hussain1-Jul-15 18:54
Ashfaque Hussain1-Jul-15 18:54 
QuestionHiding Few of control in UserControl Pin
Ashfaque Hussain26-Jun-15 0:16
Ashfaque Hussain26-Jun-15 0:16 
Questioni want make Online examination system so which module we used help me .and it work flow of the system Pin
Member 1178790023-Jun-15 18:38
Member 1178790023-Jun-15 18:38 
AnswerRe: i want make Online examination system so which module we used help me .and it work flow of the system Pin
Mycroft Holmes23-Jun-15 20:07
professionalMycroft Holmes23-Jun-15 20:07 
QuestionWPF Expander ExpandDirection Problem Pin
Kevin Marois22-Jun-15 12:56
professionalKevin Marois22-Jun-15 12:56 
AnswerRe: WPF Expander ExpandDirection Problem Pin
Pete O'Hanlon22-Jun-15 19:03
mvePete O'Hanlon22-Jun-15 19:03 
GeneralRe: WPF Expander ExpandDirection Problem Pin
Kevin Marois23-Jun-15 4:21
professionalKevin Marois23-Jun-15 4:21 
GeneralRe: WPF Expander ExpandDirection Problem Pin
Kevin Marois23-Jun-15 5:01
professionalKevin Marois23-Jun-15 5:01 
AnswerRe: WPF Expander ExpandDirection Problem Pin
maddymaddy1428-Jun-15 21:16
maddymaddy1428-Jun-15 21:16 
QuestionGlobal Exception Handling Pin
Kevin Marois19-Jun-15 12:24
professionalKevin Marois19-Jun-15 12:24 
QuestionRe: Global Exception Handling Pin
Richard Deeming22-Jun-15 1:23
mveRichard Deeming22-Jun-15 1:23 
AnswerRe: Global Exception Handling Pin
Kevin Marois22-Jun-15 3:50
professionalKevin Marois22-Jun-15 3:50 
GeneralRe: Global Exception Handling Pin
Richard Deeming22-Jun-15 3:55
mveRichard Deeming22-Jun-15 3:55 
GeneralRe: Global Exception Handling Pin
Kevin Marois22-Jun-15 3:56
professionalKevin Marois22-Jun-15 3:56 
AnswerRe: Global Exception Handling Pin
maddymaddy1428-Jun-15 23:39
maddymaddy1428-Jun-15 23:39 
QuestionWPF Register Controls Pin
Kevin Marois19-Jun-15 5:15
professionalKevin Marois19-Jun-15 5:15 

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.