Click here to Skip to main content
15,880,503 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF Ribbon Control Pin
Naz_Firdouse8-Apr-14 3:07
Naz_Firdouse8-Apr-14 3:07 
QuestionToolTip is not fully visible Pin
SRKSHOME2-Apr-14 0:42
SRKSHOME2-Apr-14 0:42 
QuestionBind Grid Row's IsExpanded To Row's Data Object Pin
Kevin Marois31-Mar-14 12:41
professionalKevin Marois31-Mar-14 12:41 
QuestionUser Control Question Pin
Kevin Marois25-Mar-14 8:05
professionalKevin Marois25-Mar-14 8:05 
AnswerRe: User Control Question Pin
_Maxxx_2-Apr-14 18:39
professional_Maxxx_2-Apr-14 18:39 
GeneralRe: User Control Question Pin
Kevin Marois2-Apr-14 18:49
professionalKevin Marois2-Apr-14 18:49 
GeneralRe: User Control Question Pin
_Maxxx_2-Apr-14 19:36
professional_Maxxx_2-Apr-14 19:36 
GeneralRe: User Control Question Pin
Kevin Marois3-Apr-14 5:47
professionalKevin Marois3-Apr-14 5:47 
OK, I think you were right. The Output window was showing a Null being passed as SelectedValue.

So I made the following changes::

In the control:

public object SelectecCategory
{
    get { return (object)GetValue(SelectecCategoryProperty); }
    set 
    { 
        SetValue(SelectecCategoryProperty, value); 
    }
}

public static readonly DependencyProperty SelectecCategoryProperty =
    DependencyProperty.Register("SelectecCategory", typeof(object), typeof(LookupComboControl));


In the MainWindow

<ComboBox x:Name="CategoryCombo"
            Grid.Row="1"
            ItemsSource="{Binding Categories}"
            SelectedValuePath="Id"
            DisplayMemberPath="Category"
            VerticalAlignment="Center"
            Height="24"
            Width="375"/>

<views:LookupComboControl Grid.Row="2"
                            SelectecCategory="{Binding ElementName=CategoryCombo, Path=SelectedItem, Mode=TwoWay}"
                            Height="70"
                            Width="400"/>


Now I get no binding errors. But the original problem still exists... Nothing happens.

So here's my question - The UserControl has the DP. Once the MainWindow sets the DP, how does the User Control's VM know about it? Again, I need to somehow get the selected category into the ViewModel.

[UPDATE]
The source is https://onedrive.live.com/redir?resid=F6FBCF1880A16630!210&authkey=!AA4CNT499dsekPY&ithint=file%2c.zip
If it's not broken, fix it until it is

GeneralRe: User Control Question Pin
BubingaMan23-Apr-14 4:13
BubingaMan23-Apr-14 4:13 
QuestionPrefixing ListBoxItem index in DataTemplate Pin
Dominick Marciano22-Mar-14 21:33
professionalDominick Marciano22-Mar-14 21:33 
AnswerRe: Prefixing ListBoxItem index in DataTemplate Pin
SledgeHammer0123-Mar-14 9:22
SledgeHammer0123-Mar-14 9:22 
GeneralRe: Prefixing ListBoxItem index in DataTemplate Pin
Dominick Marciano25-Mar-14 4:42
professionalDominick Marciano25-Mar-14 4:42 
GeneralRe: Prefixing ListBoxItem index in DataTemplate Pin
SledgeHammer0125-Mar-14 4:55
SledgeHammer0125-Mar-14 4:55 
QuestionCustom Window WPF con Vb.Net Pin
Pablo Roberto Cuellar Ribera21-Mar-14 9:59
Pablo Roberto Cuellar Ribera21-Mar-14 9:59 
AnswerRe: Custom Window WPF con Vb.Net Pin
Kenneth Haugland21-Mar-14 10:11
mvaKenneth Haugland21-Mar-14 10:11 
GeneralRe: Custom Window WPF con Vb.Net Pin
Pablo Roberto Cuellar Ribera21-Mar-14 10:40
Pablo Roberto Cuellar Ribera21-Mar-14 10:40 
QuestionRe: Custom Window WPF con Vb.Net Pin
Kenneth Haugland23-Mar-14 10:49
mvaKenneth Haugland23-Mar-14 10:49 
AnswerRe: Custom Window WPF con Vb.Net Pin
Meshack Musundi24-Mar-14 20:04
professionalMeshack Musundi24-Mar-14 20:04 
GeneralRe: Custom Window WPF con Vb.Net Pin
Pablo Roberto Cuellar Ribera28-Mar-14 5:58
Pablo Roberto Cuellar Ribera28-Mar-14 5:58 
QuestionWPF problem with ScrollViewer Pin
Federico Barbieri20-Mar-14 23:48
Federico Barbieri20-Mar-14 23:48 
AnswerRe: WPF problem with ScrollViewer Pin
Pete O'Hanlon21-Mar-14 0:08
mvePete O'Hanlon21-Mar-14 0:08 
QuestionMoving Items Between StackPanels With Animation Pin
Saeid Mirzaee19-Mar-14 4:01
Saeid Mirzaee19-Mar-14 4:01 
QuestionStyle In Resource Dictionary Not Found Pin
Kevin Marois17-Mar-14 16:49
professionalKevin Marois17-Mar-14 16:49 
AnswerRe: Style In Resource Dictionary Not Found Pin
Pete O'Hanlon18-Mar-14 5:45
mvePete O'Hanlon18-Mar-14 5:45 
GeneralRe: Style In Resource Dictionary Not Found Pin
Kevin Marois18-Mar-14 5:46
professionalKevin Marois18-Mar-14 5:46 

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.