我試圖讓用戶從我的數(shù)據(jù)庫中選擇要顯示的表,我聽說這樣做的最佳方法是使用“selectedIndexChanged”事件,這樣當(dāng)用戶單擊所需的表時,它會立即顯示它。但是,出于某種原因,當(dāng)我單擊我的組合框然后單擊事件時,我沒有看到“selectedIndexChanged”作為一個選項,并且在手動編寫時顯示:“無法識別成員“SelectedIndexChanged”或無法訪問“這是我的 xaml 代碼: <Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp1" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"><Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="4*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Canvas Name="mycanvas" Background="LightBlue" Margin="0,0,34.4,-0.2"> <DataGrid Name="g1"> </DataGrid> <Label Name="l1" Content="" FontWeight="ExtraBold" FontSize="15" Foreground="{x:Null}" Canvas.Left="20"/> </Canvas> <Canvas Grid.Column="1"> <Label Name="Instruction" Content="Choose a table" FontWeight="ExtraBold" FontSize="15" Canvas.Left="-23" Canvas.Top="62"/> 有誰知道如何解決它或我做錯了什么?在下面的代碼片段中,我要求用戶輸入他們的目錄路徑以定位他們要轉(zhuǎn)換的 .pdf 文件。但是,我希望能夠一次轉(zhuǎn)換一批 .pdf 文件。我怎么能去做這件事?假設(shè)用戶在目錄路徑中有 100 個 .pdf 文件,每個文件都有不同的文件名。更改我的代碼以便能夠一次批量轉(zhuǎn)換所有 .pdf 文件的最佳方法是什么?
- 1 回答
- 0 關(guān)注
- 210 瀏覽
添加回答
舉報
0/150
提交
取消