C# cs不会检测xaml中的元素

C# cs不会检测xaml中的元素,c#,wpf,xaml,xamarin.forms,C#,Wpf,Xaml,Xamarin.forms,因此,基本上,我决定第一次编写一个应用程序,我选择使用Xamarin制作一个便携式应用程序 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="App1.S

因此,基本上,我决定第一次编写一个应用程序,我选择使用Xamarin制作一个便携式应用程序

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="App1.Sheet">

    <Grid Height="0" Width="0">

        <GroupBox  HorizontalAlignment="Left" VerticalAlignment="Top" Height="0" Width="0" Margin="-269,-341,0,0" >
            <GroupBox.Header>
                <TextBlock Text="Xp Gain"/>
            </GroupBox.Header>
            <Canvas Height="46" Width="142" >
                <Label Name="lblXpValue" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="259" Margin="68,24,-90,-46" HorizontalAlignment="Right" VerticalAlignment="Bottom" >0</Label>
                <CheckBox Name="cbTrainer" Height="17" Width="107" TabIndex="261" Margin="-4,4,-103,-21" HorizontalAlignment="Right" VerticalAlignment="Bottom" Checked="cbTrainer_CheckedChanged" >Trainer Pokemon</CheckBox>
                <Label Name="label7" Height="22" Width="65" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="258" Margin="6,24,-71,-46" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Xp Value:</Label>
            </Canvas>
        </GroupBox>
        <Label Name="lblStab" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="257" Margin="0,-101,-205,79" HorizontalAlignment="Right" VerticalAlignment="Bottom" >0</Label>
        <Label Name="label42" Height="22" Width="50" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="256" Margin="0,-101,-193,79" HorizontalAlignment="Right" VerticalAlignment="Bottom" >STAB:</Label>
        <GroupBox Margin="0,-178,-267,95" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="83" Width="109" >
            <GroupBox.Header>
                <TextBlock Text="Types"/>
            </GroupBox.Header>
            <Canvas Height="60" Width="97" >
                <ComboBox Name="cbTypeTwo" Height="21" Width="97" TabIndex="14" Margin="-1,30,-96,-51" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
                    <ComboBoxItem>Normal</ComboBoxItem>
                    <ComboBoxItem>Fire</ComboBoxItem>
                    <ComboBoxItem>Water</ComboBoxItem>
                    <ComboBoxItem>Electric</ComboBoxItem>
                    <ComboBoxItem>Grass</ComboBoxItem>
                    <ComboBoxItem>Ice</ComboBoxItem>
                    <ComboBoxItem>Fighting</ComboBoxItem>
                    <ComboBoxItem>Poison</ComboBoxItem>
                    <ComboBoxItem>Ground</ComboBoxItem>
                    <ComboBoxItem>Flying</ComboBoxItem>
                    <ComboBoxItem>Psychic</ComboBoxItem>
                    <ComboBoxItem>Bug</ComboBoxItem>
                    <ComboBoxItem>Rock</ComboBoxItem>
                    <ComboBoxItem>Ghost</ComboBoxItem>
                    <ComboBoxItem>Dragon</ComboBoxItem>
                    <ComboBoxItem>Dark</ComboBoxItem>
                    <ComboBoxItem>Steel</ComboBoxItem>
                    <ComboBoxItem>None</ComboBoxItem>
                </ComboBox>
                <ComboBox Name="cbTypeOne" Height="21" Width="97" TabIndex="13" Margin="-1,4,-96,-25" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
                    <ComboBoxItem>Normal</ComboBoxItem>
                    <ComboBoxItem>Fire</ComboBoxItem>
                    <ComboBoxItem>Water</ComboBoxItem>
                    <ComboBoxItem>Electric</ComboBoxItem>
                    <ComboBoxItem>Grass</ComboBoxItem>
                    <ComboBoxItem>Ice</ComboBoxItem>
                    <ComboBoxItem>Fighting</ComboBoxItem>
                    <ComboBoxItem>Poison</ComboBoxItem>
                    <ComboBoxItem>Ground</ComboBoxItem>
                    <ComboBoxItem>Flying</ComboBoxItem>
                    <ComboBoxItem>Psychic</ComboBoxItem>
                    <ComboBoxItem>Bug</ComboBoxItem>
                    <ComboBoxItem>Rock</ComboBoxItem>
                    <ComboBoxItem>Ghost</ComboBoxItem>
                    <ComboBoxItem>Dragon</ComboBoxItem>
                    <ComboBoxItem>Dark</ComboBoxItem>
                    <ComboBoxItem>Steel</ComboBoxItem>
                    <ComboBoxItem>None</ComboBoxItem>
                </ComboBox>
            </Canvas>
        </GroupBox>
        <GroupBox Margin="0,-272,-267,176" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="96" Width="109" >
            <GroupBox.Header>
                <TextBlock Text="Health"/>
            </GroupBox.Header>
            <Canvas Height="73" Width="97" >
                <TextBox Name="tbMaxHealth" Height="20" Width="50" TabIndex="2" Margin="46,30,-96,-50" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <Label Name="label36" Height="22" Width="39" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="1" Margin="20,33,-59,-55" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Max:</Label>
                <Label Name="label35" Height="22" Width="53" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="6,7,-59,-29" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Current:</Label>
            </Canvas>
        </GroupBox>
        <Menu Name="msHeader" Height="24" Width="560" TabIndex="21" Margin="-279,-356,-281,332" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
            <MenuItem Header="_Options" Name="optionsToolStripMenuItem" >
                <MenuItem Header="_Reset" Name="resetToolStripMenuItem" ></MenuItem>
                <MenuItem Header="" Name="toolStripSeparator1" ></MenuItem>
                <MenuItem Header="_Save" Name="saveToolStripMenuItem" ></MenuItem>
                <MenuItem Header="_Load" Name="loadToolStripMenuItem" ></MenuItem>
                <MenuItem Header="Export" Name="exportToolStripMenuItem" ></MenuItem>
                <MenuItem Header="Set E-Mail" Name="setEMailToolStripMenuItem" ></MenuItem>
            </MenuItem>
            <MenuItem Header="Tools" Name="toolsToolStripMenuItem" >
                <MenuItem Header="Stats..." Name="statsToolStripMenuItem" >
                    <MenuItem Header="Randomize" Name="randomizeToolStripMenuItem" ></MenuItem>
                    <MenuItem Header="Reset" Name="resetToolStripMenuItem1" ></MenuItem>
                </MenuItem>
                <MenuItem Header="R_andomize Nature" Name="randomizeNatureToolStripMenuItem" ></MenuItem>
                <MenuItem Header="" Name="toolStripSeparator3" ></MenuItem>
                <MenuItem Header="N_otes" Name="notesToolStripMenuItem" ></MenuItem>
                <MenuItem Header="_Held Item" Name="heldItemToolStripMenuItem" ></MenuItem>
            </MenuItem>
        </Menu>
        <GroupBox Margin="0,-71,-267,-26" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="97" Width="243" >
            <GroupBox.Header>
                <TextBlock Text="Abilities"/>
            </GroupBox.Header>
            <Canvas Height="74" Width="231" >
                <ListView Name="lvAbilities" Height="70" Width="240" Margin="-7,1,-233,-71" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
                    <ListView.View >
                        <GridView >
                        </GridView >
                    </ListView.View>
                </ListView>
            </Canvas>
        </GroupBox>
        <GroupBox Margin="-91,0,-267,-348" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="324" Width="358" >
            <GroupBox.Header>
                <TextBlock Text="Moves"/>
            </GroupBox.Header>
            <Canvas Height="301" Width="346" >
                <TextBox Name="tbEffect" Height="145" Width="155" TabIndex="257" Margin="182,108,-337,-253" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <Label Name="label41" Height="22" Width="47" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="256" Margin="148,111,-195,-133" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Effect:</Label>
                <TextBox Name="tbSpecial" Height="20" Width="155" TabIndex="257" Margin="182,82,-337,-102" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <Label Name="label39" Height="22" Width="54" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="256" Margin="141,85,-195,-107" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Special:</Label>
                <ListView Name="lvMoves" Height="294" Width="126" Margin="-4,1,-122,-295" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
                    <ListView.View >
                        <GridView >
                        </GridView >
                    </ListView.View>
                </ListView>
                <Label Name="label40" Height="22" Width="86" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="9" Margin="138,282,-224,-304" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Contest Effect:</Label>
                <Label Name="lblContestEffect" Height="22" Width="9" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="8" Margin="226,191,-235,-213" HorizontalAlignment="Right" VerticalAlignment="Bottom" ></Label>
                <Label Name="lblContestAppeal" Height="22" Width="9" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="8" Margin="226,173,-235,-195" HorizontalAlignment="Right" VerticalAlignment="Bottom" ></Label>
                <Label Name="lblContestType" Height="22" Width="9" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="8" Margin="226,155,-235,-177" HorizontalAlignment="Right" VerticalAlignment="Bottom" ></Label>
                <Label Name="label38" Height="22" Width="91" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="7" Margin="138,269,-229,-291" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Contest Appeal:</Label>
                <Label Name="label37" Height="22" Width="82" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="7" Margin="138,256,-220,-278" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Contest Type:</Label>
                <Label Name="label34" Height="22" Width="51" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="5" Margin="242,33,-293,-55" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Range:</Label>
                <Label Name="label33" Height="22" Width="33" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="5" Margin="260,7,-293,-29" HorizontalAlignment="Right" VerticalAlignment="Bottom" >AC:</Label>
                <Label Name="label32" Height="22" Width="40" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="4" Margin="142,59,-182,-81" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Freq:</Label>
                <Label Name="label31" Height="22" Width="37" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="3" Margin="145,33,-182,-55" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Roll:</Label>
                <TextBox Name="tbFrequency" Height="20" Width="56" TabIndex="255" Margin="169,56,-225,-76" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbDmgRoll" Height="20" Width="56" TabIndex="255" Margin="169,30,-225,-50" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbRange" Height="20" Width="57" TabIndex="255" Margin="280,30,-337,-50" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbAccuracyChk" Height="20" Width="57" TabIndex="255" Margin="280,4,-337,-24" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbMoveType" Height="20" Width="57" TabIndex="255" Margin="168,4,-225,-24" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <Label Name="label30" Height="22" Width="43" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="1" Margin="139,7,-182,-29" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Type:</Label>
            </Canvas>
        </GroupBox>
        <GroupBox Margin="-254,0,97,-348" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="257" Width="157" >
            <GroupBox.Header>
                <TextBlock Text="Capabilities"/>
            </GroupBox.Header>
            <Canvas Height="234" Width="145" >
                <ListView Name="lvCapabilities" Height="230" Width="154" Margin="-7,1,-147,-231" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
                    <ListView.View >
                        <GridView >
                        </GridView >
                    </ListView.View>
                </ListView>
            </Canvas>
        </GroupBox>
        <GroupBox Margin="0,-178,-149,69" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="109" Width="125" >
            <GroupBox.Header>
                <TextBlock Text="Evasion Bonuses"/>
            </GroupBox.Header>
            <Canvas Height="86" Width="113" >
                <Label Name="label29" Height="22" Width="41" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="3" Margin="34,59,-75,-81" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Both:</Label>
                <Label Name="label28" Height="22" Width="54" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="2" Margin="21,33,-75,-55" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Special:</Label>
                <TextBox Name="tbSpeedBonus" Height="20" Width="50" TabIndex="255" Margin="62,56,-112,-76" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbSpecialBonus" Height="20" Width="50" TabIndex="255" Margin="62,30,-112,-50" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <TextBox Name="tbPhysicalBonus" Height="20" Width="50" TabIndex="255" Margin="62,4,-112,-24" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" ></TextBox>
                <Label Name="label27" Height="22" Width="58" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="17,7,-75,-29" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Physical:</Label>
            </Canvas>
        </GroupBox>
        <GroupBox Margin="-254,-178,-15,-26" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="204" Width="269" >
            <GroupBox.Header>
                <TextBlock Text="Stats - 0 points remaining"/>
            </GroupBox.Header>
            <Canvas Height="181" Width="257" >
                <TextBox Name="tbFinalSpeed" Height="20" Width="53" TabIndex="255" Margin="203,148,-256,-168" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <TextBox Name="tbFinalSpDef" Height="20" Width="53" TabIndex="255" Margin="203,122,-256,-142" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <TextBox Name="tbFinalSpAtk" Height="20" Width="53" TabIndex="255" Margin="203,96,-256,-116" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <TextBox Name="tbFinalDef" Height="20" Width="53" TabIndex="255" Margin="203,70,-256,-90" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <TextBox Name="tbFinalAtk" Height="20" Width="53" TabIndex="255" Margin="203,44,-256,-64" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <TextBox Name="tbFinalHP" Height="20" Width="53" TabIndex="255" Margin="203,18,-256,-38" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsReadOnly="True" TextWrapping="Wrap" >0</TextBox>
                <Label Name="label26" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,151,-216,-173" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label20" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,151,-150,-173" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label25" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,125,-216,-147" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label19" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,125,-150,-147" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label24" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,99,-216,-121" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label18" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,99,-150,-121" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label23" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,73,-216,-95" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label17" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,73,-150,-95" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label22" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,47,-216,-69" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label16" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,47,-150,-69" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label21" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="194,23,-216,-45" HorizontalAlignment="Right" VerticalAlignment="Bottom" >=</Label>
                <Label Name="label15" Height="22" Width="22" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="22" Margin="128,23,-150,-45" HorizontalAlignment="Right" VerticalAlignment="Bottom" >+</Label>
                <Label Name="label14" Height="22" Width="47" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="21" Margin="148,1,-195,-23" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Added</Label>
                <Label Name="label13" Height="22" Width="40" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="20" Margin="86,1,-126,-23" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Base</Label>
                <Label Name="lblSpeed" Height="22" Width="50" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="34,151,-84,-173" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Speed:</Label>
                <Label Name="lblSpDef" Height="22" Width="78" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="6,125,-84,-147" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Sp. Defense:</Label>
                <Label Name="lblSpAtk" Height="22" Width="69" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="15,99,-84,-121" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Sp. Attack:</Label>
                <Label Name="lblDef" Height="22" Width="59" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="25,73,-84,-95" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Defense:</Label>
                <Label Name="lblAtk" Height="22" Width="50" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="34,47,-84,-69" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Attack:</Label>
                <Label Name="lblHP" Height="22" Width="34" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="50,21,-84,-43" HorizontalAlignment="Right" VerticalAlignment="Bottom" >HP:</Label>
            </Canvas>
        </GroupBox>
        <ComboBox Name="cbNature" Height="21" Width="128" TabIndex="6" Margin="0,-206,-130,185" HorizontalAlignment="Right" VerticalAlignment="Bottom" SelectionChanged="CbNatureSelectedIndexChanged" >
            <ComboBoxItem>Hardy</ComboBoxItem>
            <ComboBoxItem>Docile</ComboBoxItem>
            <ComboBoxItem>Proud</ComboBoxItem>
            <ComboBoxItem>Quirky</ComboBoxItem>
            <ComboBoxItem>Lazy</ComboBoxItem>
            <ComboBoxItem>Desperate</ComboBoxItem>
            <ComboBoxItem>Lonely</ComboBoxItem>
            <ComboBoxItem>Adamant</ComboBoxItem>
            <ComboBoxItem>Naughty</ComboBoxItem>
            <ComboBoxItem>Brave</ComboBoxItem>
            <ComboBoxItem>Stark</ComboBoxItem>
            <ComboBoxItem>Bold</ComboBoxItem>
            <ComboBoxItem>Impish</ComboBoxItem>
            <ComboBoxItem>Lax</ComboBoxItem>
            <ComboBoxItem>Relaxed</ComboBoxItem>
            <ComboBoxItem>Bashful</ComboBoxItem>
            <ComboBoxItem>Modest</ComboBoxItem>
            <ComboBoxItem>Mild</ComboBoxItem>
            <ComboBoxItem>Rash</ComboBoxItem>
            <ComboBoxItem>Quiet</ComboBoxItem>
            <ComboBoxItem>Sickly</ComboBoxItem>
            <ComboBoxItem>Calm</ComboBoxItem>
            <ComboBoxItem>Gentle</ComboBoxItem>
            <ComboBoxItem>Careful</ComboBoxItem>
            <ComboBoxItem>Sassy</ComboBoxItem>
            <ComboBoxItem>Serious</ComboBoxItem>
            <ComboBoxItem>Timid</ComboBoxItem>
            <ComboBoxItem>Hasty</ComboBoxItem>
            <ComboBoxItem>Jolly</ComboBoxItem>
            <ComboBoxItem>Na?ve</ComboBoxItem>
            <ComboBoxItem>Composed</ComboBoxItem>
            <ComboBoxItem>Dull</ComboBoxItem>
            <ComboBoxItem>Patient</ComboBoxItem>
            <ComboBoxItem>Poised</ComboBoxItem>
            <ComboBoxItem>Stoic</ComboBoxItem>
        </ComboBox>
        <Label Name="label6" Height="22" Width="51" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="15" Margin="-36,-203,-15,181" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Nature:</Label>
        <Label Name="label5" Height="22" Width="54" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="14" Margin="-39,-230,-15,208" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Gender:</Label>
        <ComboBox Name="cbGender" Height="21" Width="128" TabIndex="5" Margin="0,-233,-130,212" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
            <ComboBoxItem>Male</ComboBoxItem>
            <ComboBoxItem>Female</ComboBoxItem>
        </ComboBox>
        <ComboBox Name="cbSpecies" Height="21" Width="128" TabIndex="3" Margin="0,-273,-130,252" HorizontalAlignment="Right" VerticalAlignment="Bottom" SelectionChanged="CbSpeciesSelectedIndexChanged" />
        <Label Name="label4" Height="22" Width="57" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="11" Margin="-42,-270,-15,248" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Species:</Label>
        <Label Name="label3" Height="22" Width="72" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="8" Margin="0,-297,-149,275" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Experience:</Label>
        <Label Name="label2" Height="22" Width="45" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="6" Margin="-30,-297,-15,275" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Level:</Label>
        <TextBox Name="tbNickname" Height="20" Width="246" TabIndex="0" TextChanged="TbNicknameTextChanged" Margin="0,-325,-248,305" HorizontalAlignment="Right" VerticalAlignment="Bottom" TextWrapping="Wrap" />
        <Label Name="label1" Height="22" Width="115" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="4" Margin="-100,-322,-15,300" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Pok?mon Nickname:</Label>
        <CheckBox Name="cboxExp" Height="17" Width="72" TabIndex="255" Margin="-107,-298,35,281" HorizontalAlignment="Right" VerticalAlignment="Bottom" Checked="CboxExpCheckedChanged" >Auto EXP</CheckBox>
    </Grid>
</ContentPage>

0
宠物训练师
Xp值:
0
刺:
正常的
火
水
电的
草
冰
战斗
毒药
地面
飞行
通灵的
缺陷
摇滚乐
鬼魂
龙
黑暗的
钢
没有一个
正常的
火
水
电的
草
冰
战斗
毒药
地面
飞行
通灵的
缺陷
摇滚乐
鬼魂
龙
黑暗的
钢
没有一个
最大值:
当前:
效果:
特别:
比赛效果:
比赛呼吁:
比赛类型:
范围:
交流电:
频率:
滚动:
类型:
两者:
特别:
物理:
0
0
0
0
0
0
=
+
=
+
=
+
=
+
=
+
=
+
补充
基础
速度:
Sp.国防部:
Sp.攻击:
防守:
攻击:
惠普:
能吃苦耐劳的
温顺的
自豪的
古怪的
懒惰的
绝望的
孤独的
坚定的
顽皮的
勇敢的
明显的
大胆的
顽皮的
松懈的
轻松的
害羞的
谦逊的
温和的
皮疹
安静的
病态的
平静的
温和的
仔细的
时髦的
严肃的
胆小的
仓促
愉快的
天真的
组成
迟钝的
病人
摆好姿势准备行动的
坚忍的
性质:
性别:
男性
女性
种类:
经验:
级别:
Pok?mon昵称:
自动经验
我已经在WinForms中将其作为windows应用程序制作,因此我将designer.cs转换为XAML,然后将其放入WPF并进行编辑,使其看起来正确,然后将XAML从
标记中插入,并将其放入我的应用程序中XAML页面的
部分,XAML文件后面的cs无法检测到元素,我可以在WPF应用程序中看到它们并编辑它们,但在我的应用程序解决方案中我不能,有人知道这里出了什么问题吗?我做了什么蠢事吗

谢谢

编辑:所以我决定重新开始,从头开始创建XAML,我有如下步骤:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="App1.Sheet">
    <Grid>
        <StackLayout>
            <Image x:Name="imgTest" Source="App1.Sheet"></Image>
        </StackLayout>
    </Grid>
     </ContentPage>

然而,当我在后面的cs中键入imgTest时,它会说

imgTest在此上下文中不存在


说真的,这是怎么回事?

我担心仅仅将WPF
窗口的所有XAML标记复制到Xamarin.Forms
ContentPage
中没有多大意义。这是注定要失败的,因为Xamarin.Forms使用的XAML堆栈与WPF不同。

WPF中没有ContentPage类型…@mm8然后将XAML从标记内部粘贴,并将其放在我的应用程序中XAML页面的一部分。为什么要将WPF应用程序中的内容复制到Xamarin应用程序中?