0
我已經得到了我怎麼能我的stacklayout與特定的測量中集成海牛條碼掃描儀的問題......這裏是我的代碼的圖片...如何將海牛工作條碼掃描器集成到堆疊佈局中?
這裏是我的代碼實際代碼...請幫助我...
<ContentPage.Content>
<StackLayout x:Name="layoutWrapper" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<ActivityIndicator Color="{StaticResource headerColor}" IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" />
<Grid x:Name="scannerWrapper" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" IsVisible="{Binding IsBusy, Converter={StaticResource not}" >
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<StackLayout HeightRequest="20"></StackLayout>
<StackLayout BackgroundColor="White" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Label TextColor="Black" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" Text="{i18n:Translate ScanInventoryLbl}" />
</StackLayout>
<StackLayout HeightRequest="40"></StackLayout>
<StackLayout BackgroundColor="Black" HorizontalOptions="FillAndExpand" HeightRequest="280" VerticalOptions="FillAndExpand" Spacing="5" Orientation="Horizontal"></StackLayout>
<Label VerticalOptions="FillAndExpand" />
<Label VerticalOptions="FillAndExpand" />
<StackLayout BackgroundColor="White" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<StackLayout x:Name="ipInputLabel" BackgroundColor="White" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Spacing="5" Orientation="Horizontal">
<Label TextColor="Black" HorizontalOptions="EndAndExpand" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" Text="{i18n:Translate NoQRLbl}" />
</StackLayout>
<Label x:Name="versionAppLabel" FontSize="14" TextColor="#1976D2" VerticalOptions="End" HorizontalTextAlignment="Center" />
</StackLayout>
<StackLayout HeightRequest="20"></StackLayout>
</StackLayout>
</Grid>
</StackLayout>
</ContentPage.Content>
是啊,我用這種方式都試過,但它不工作。我嘗試在示例應用的渲染器頁面中修改一些編輯選項,但除了掃描區域之外,沒有其他選項可以編輯窗口大小。還有什麼建議?感謝您的回覆... –
我編輯了我的答案,查看如何設置您的尺寸 – MarkoJk
而我應該如何直接調用結果而不創建無效'IScanSuccessCallback.barcodeDetected(MWResult result)'? –