Bitcoin Forum
July 09, 2024, 05:54:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Urgent] C# WPF Help  (Read 65 times)
OmegaStarScream (OP)
Staff
Legendary
*
Offline Offline

Activity: 3528
Merit: 6188



View Profile
April 08, 2018, 06:24:02 AM
Last edit: April 09, 2018, 12:39:07 PM by OmegaStarScream
 #1

Bounty is negotiable.

I will try to explain the situation as much as possible, feel free to ask any questions If you need further info.

I'm using the following project: https://github.com/ButchersBoy/MaterialDesignInXamlToolkit

It contains the demo, I'm simply trying to copy the demo into my own project. So far, I'm doing good but I stumbled upon an issue. I'm using ReSharper Extension and It gave me an error (under "DemoItems" on the second line):

Code:
 <ListBox x:Name="DemoItemsListBox" Margin="0 16 0 16" SelectedIndex="0"                         
                             ItemsSource="{Binding DemoItems}"
                             PreviewMouseLeftButtonUp="UIElement_OnPreviewMouseLeftButtonUp">


                        <ListBox.ItemTemplate>
                            <DataTemplate DataType="domain:DemoItem">
                                <TextBlock Text="{Binding Name}" Margin="32 0 32 0" />
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

The error message (I can compile but nothing fills the Listbox): Cannot resolve symbol "DemoItems" Due to unknown dataContext
The file in question is MainWindow.xaml: https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/blob/master/MainDemo.Wpf/MainWindow.xaml

If you're good, I believe you won't even need to download the source code.

The weird thing here is that I downloaded that demo source code, I have the same error messages there, but when I compile, the Listbox gets filled with data and that's not the case for my application.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!