Click here to Skip to main content
15,886,873 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Returning data with a bound listbox Pin
surfluds29-May-10 6:14
surfluds29-May-10 6:14 
QuestionUsing SQL Reporting Services from VB.NET to render a report Pin
Martin_27-May-10 10:31
Martin_27-May-10 10:31 
AnswerRe: Using SQL Reporting Services from VB.NET to render a report Pin
Eddy Vluggen29-May-10 0:30
professionalEddy Vluggen29-May-10 0:30 
QuestionWinForms DataGridView RowDataBound Pin
fatix26-May-10 5:43
fatix26-May-10 5:43 
AnswerRe: WinForms DataGridView RowDataBound Pin
Abhinav S27-May-10 2:43
Abhinav S27-May-10 2:43 
QuestionWindow1.xaml -> Window1.xaml.cs - how do I get this hierarchially ordered Pin
Krischu26-May-10 4:59
Krischu26-May-10 4:59 
AnswerRe: Window1.xaml -> Window1.xaml.cs - how do I get this hierarchially ordered Pin
Abhinav S26-May-10 5:05
Abhinav S26-May-10 5:05 
AnswerRe: Window1.xaml -> Window1.xaml.cs - how do I get this hierarchially ordered Pin
Simon P Stevens26-May-10 5:51
Simon P Stevens26-May-10 5:51 
In visual studio if you right click on your project and select "Add"->"New Item" and then select a WPF window, or user control visual studio will automatically add both the xaml and the xaml.cs files which you can paste your code into.

However, if this doesn't suit you, or they somehow become disconnected - which does seem to happen sometimes - you can reattach them like this:

1) Right click on the project and select "Unload project"
2) Now your project is unloaded, right click again and select "Edit [projectname].csproj".
3) This will open the the project file for editing manually, it's just a regular xml file so is fairly easy to read.
4) Search within the xml of the csproj file for the name of your unlinked files.

5) To link a .xaml file with it's child .xaml.cs file it should look something like this:
<Page Include="Window1.xaml">
  <SubType>Designer</SubType>
  <Generator>MSBuild:Compile</Generator>
</Page>

<Compile Include="Window1.xaml.cs">
  <DependentUpon>Window1.xaml</DependentUpon>
</Compile>
(You may find that the two files are not next to each other in the .csproj file.)


If they are not correctly linked, you may find that the .xaml.cs reference is missing the dependant tag. If you just added them as regular files, you may also find the tags aren't quite correct.

6) You just need to edit you file to match this layout.

7) Now save the .csproj file. Right click on the project and select "Reload project". You two files should now be linked.
Simon

QuestionWhen is web.config called? Pin
Tripathi Swati26-May-10 0:16
Tripathi Swati26-May-10 0:16 
AnswerRe: When is web.config called? Pin
JHizzle26-May-10 0:23
JHizzle26-May-10 0:23 
GeneralRe: When is web.config called? Pin
Tripathi Swati26-May-10 0:34
Tripathi Swati26-May-10 0:34 
GeneralRe: When is web.config called? Pin
JHizzle26-May-10 0:51
JHizzle26-May-10 0:51 
GeneralRe: When is web.config called? Pin
Tripathi Swati26-May-10 0:54
Tripathi Swati26-May-10 0:54 
GeneralRe: When is web.config called? Pin
Not Active26-May-10 2:29
mentorNot Active26-May-10 2:29 
AnswerRe: When is web.config called? Pin
PIEBALDconsult27-May-10 2:29
mvePIEBALDconsult27-May-10 2:29 
QuestionOpening webpage having stylesheets in masterpage contentplaceholder Pin
mominafiz25-May-10 21:19
mominafiz25-May-10 21:19 
AnswerRe: Opening webpage having stylesheets in masterpage contentplaceholder Pin
Richard MacCutchan25-May-10 22:27
mveRichard MacCutchan25-May-10 22:27 
AnswerRe: Opening webpage having stylesheets in masterpage contentplaceholder Pin
T M Gray26-May-10 8:03
T M Gray26-May-10 8:03 
QuestionNarayanan [modified] Pin
Narayanan chidambaram25-May-10 20:26
Narayanan chidambaram25-May-10 20:26 
AnswerRe: Narayanan Pin
Hristo-Bojilov25-May-10 20:40
Hristo-Bojilov25-May-10 20:40 
AnswerRe: Narayanan Pin
Abhinav S25-May-10 20:46
Abhinav S25-May-10 20:46 
AnswerRe: Narayanan Pin
Dave Kreskowiak26-May-10 2:09
mveDave Kreskowiak26-May-10 2:09 
AnswerRe: Narayanan Pin
LloydA11130-May-10 11:26
LloydA11130-May-10 11:26 
QuestionNET Framework 3.5 Configuration tool in VISTA Pin
NarVish25-May-10 19:34
NarVish25-May-10 19:34 
AnswerRe: NET Framework 3.5 Configuration tool in VISTA Pin
Hristo-Bojilov25-May-10 20:37
Hristo-Bojilov25-May-10 20:37 

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.